This post has been updated in August 2018 due to changes in the interface of Google Webmaster Tools. In fact, the tool has been renamed ever since I first wrote this blog post and it now called Google Search Console. If your website is not connected to Google Search Console I suggest you do it as soon as possible.
Google does not index web pages, it indexes URLs, for this reason, it does not automatically understand that http:// MyWebsite.com and http://www.MyWebsite.com is essentially the same page.
This can create two problems:
- Google thinks you have duplicate content; not great for your search engine ranking.
- External links may use different format of the URL to link to your site and Google will not count all of them towards one URL thus diluting the potential impact of the created backlinks; not great for you search engine ranking either
First, you have to decide what your preferred domain (Aka canonical domain) is. In other words, you need to decide if you want the world to use www.MyWebsite.com or MyWebsite.com and let the world know. And than:
1. In your WordPress admin area under Settings>>General enter the chosen format into the WordPress address and site address fields
2. In the Search Conule ( If you do not have an account yet, check out my post: How to setup Google Webmaster Tools )
- You will need to add the site twice. Once with the www prefix and once without it.
- After you verify ownership on both sites, step into the dashboard of one of the two by clicking on its name on the Webmaster Tools home page.
- On the right top corner of the screen click on the setting icon and select “Site Settings”
That’s it. You are safe!
Here you should select your Preferred domain and do not forget to click save
And this is it. You are all set!