Preferred Domain Version
On This Page
When it comes to SEO, domain names can get complicated. Typically, there are multiple versions of a domain that can be used and as an SEO, we have to choose just one that we are going to use permanently.
URL Anatomy
It’s important to understand the basic parts of a URL before we get started.
Different Versions of Domains
There are usually two versions of a domain name to choose from. You can either have a www subdomain or no subdomain.
Example: https://www.domain.com and https://domain.com
If the site has an SSL certificate installed, then there can be up to four versions of a domain name. This will include the two listed above, plus the two additional listed below:
Example: https://www.domain.com and https://domain.com
Table of Possible Domain Versions
Protocol | With Subdomain | Without Subdomain |
HTTP | https://www.domain.com | |
HTTP | https://domain.com | |
HTTPS | https://www.domain.com | |
HTTPS | https://domain.com |
Setting The Preferred Version
Once you have decided which version you are going to stick with, the preferred version should be the same in all the tools listed below.
Item | Where to Access |
WordPress Admin* | General Settings |
Google Analytics | Property Settings |
Google Search Console | Site Settings |
Redirects | .htaccess file, cPanel, plugins, etc. |
*If the site is not WordPress, the CMS you are using should have some area where you can choose the preferred domain.
WordPress Admin
You can log into WordPress and click on Settings > General. Here you can see what the preferred version is.
Google Analytics
If you go to the Property Settings in Google Analytics, you can see which version is being tracked. If you make any changes here, make sure to view live traffic data to make sure Google Analytics is still tracking properly.
Google Search Console
Go into Google Search Console and make sure each version is verified using “Domain” or “URL Prefix” method.
Redirects
You should try to access each version of the domain in your web browser by typing it in manually into the address bar. The preferred version should give you a 200 HTTP status code. The other versions should all 301 redirect to the preferred version. Here’s an example of what should happen if https://domain.com was the preferred version:
Notes | Version | HTTP Status Code | Redirects To |
https://www.domain.com | 301 | https://domain.com | |
https://domain.com | 301 | https://domain.com | |
https://www.domain.com | 301 | https://domain.com | |
Preferred Version | https://domain.com | 200 | Does not redirect |
TIP: Here is a great Chrome extension that will show you the HTTP status codes.
If the domain is not redirecting properly, you will have to contact the hosting company for help or an experienced web developer. If you are super experienced in this area yourself, then you can try to fix this in the .htacess file, in cPanel or via a WordPress plugin.