How and why do I need to set a preferred domain?

By default a domain can be reached via four unique urls:

  • http://example.com
  • http://www.example.com
  • https://example.com
  • https://www.example.com
For search engines and visitors it can be unclear which one is the 'right' one. The result can be that users share http://-version on social media, Bing selects https://www-version as their preferred domain to index and Google prefers https://-version to index. 

It is best practice to be crystal clear about the version you want to be the preferred version. Let's say https://www.example.com is the version we want to be the version to be crawled, indexed and ranked.

Redirecting other versions to https://www.example.com

On the server side you can redirect other version to your preferred versions with a 301 status code. All users and crawlers will be redirected to your preferred version. The result will be that only one version can be visited. 

After you changed these settings on the server side, don't forget to check your internal links to other pages, stylesheets, javascript files and other assets if they point to the preferred version to prevent unnecessary requests and redirects.

Use a canonical tag

With a canonical tag you can inform search engines about your preferred url-version. This can be used for http/https/www/non-www, but also if you sell T-Shirts for example with all kind of options like color and size. You don't want each possible option to be indexed. In those situations you can point all those versions to https://www.example.com/shirts/awesome-t-shirt/

Set preferred domain in Google Search Console

In Google Search Console you need to add all properties, after that you can select your preferred version. Google will then use the preferred domain in their search results. 


Reacties

Populaire posts van deze blog

Puck.JS Torch