{"id":7145,"date":"2017-02-06T16:11:22","date_gmt":"2017-02-06T16:11:22","guid":{"rendered":"http:\/\/hostileblog.com\/?p=4290"},"modified":"2020-05-30T21:35:41","modified_gmt":"2020-05-31T01:35:41","slug":"set-preferred-domain-google","status":"publish","type":"post","link":"https:\/\/www.carnaghan.com\/set-preferred-domain-google\/","title":{"rendered":"How to set preferred domain correctly in Google Search Console"},"content":{"rendered":"\n
Setting a preferred domain is one of the most important things to do after launching a new site. It takes few seconds to set a PD. Before setting a preferred domain, you should make sure that Google<\/span> indexes only the URLS<\/span> which you want to appear in search results. To do so, you must set up a 301 redirect.<\/p>\n\n\n\n A 301 redirect will prevent duplicate content<\/span> issues. It will tell search engines that they should index the correct web pages.<\/p>\n\n\n\n Webmasters should make sure that the following variants of their domain redirect with HTTP<\/span> status code 301 to one which they want to set as preferred.<\/p>\n\n\n\n WWW only, HTTP<\/span> only, HTTP<\/span>+WWW<\/p>\n\n\n\n If you don’t configure the 301 redirects correctly, Google<\/span> and other search engines will crawl and index non-WWW as well the WWW version of your website<\/span> and they’ll be confused to rank your website pages in search results<\/a>.<\/p>\n\n\n\n After entering the redirect<\/span> rule in the Nginx or Apache<\/span> configuration file<\/span>, test your website URLS using the CURL command<\/a> or with redirect<\/span> checker tools.<\/p>\n\n\n\n