www vs no-www

Back in the day you could visit a website with or without www in the URL and everything was hunky-dory. This is no longer the case. Technically https://www.example.com/ and https://example.com/ are completely different domains. The first URL is a subdomain of the second.

Browsers are locking down certain types of requests between 2 different domains (such as the 2 domains above). This means that you need to choose. Do you want www or no-www in your URL?

You cannot have both. In fact, having both can hurt your SEO scores with Google because it means that you have duplicate content on the internet and you will get docked ranking points for this. No-one wants that.

What do you need to do?

Inside of your project settings, you define the website address for your site. This needs to contain the one true URL for your website. What you have set here needs to be used wherever you reference any warehoused files or URLs to your website.

You need to make sure that when you visit your site, this is the URL that you use. Otherwise, some things may not work on your site.

Setup htaccess rules to enforce the chosen URL

You should setup htaccess rules that force a user to either www or no-www. Please reference this FAQ.

Common places I see this being an issue

The following are cases where I commonly see users affected by this. Please follow the advice above to fix your situation.

  • PDF Embed requires this. If your website URL has www but the URL to your PDF does not, it will break. The reverse is true.

  • Saving data to Total CMS via the admin page requires that your URL is setup properly.

  • If you are using Offsite to load another page on your website into an iframe, the domains must match.

Video Tutorial

If you want more data on this, I did an entire live stream on the topic.

9
5 replies