How to stop Google indexing both www. and also no - www variations of my internet site

When I do a search of my website in Google it reveals both:

  • mydomain.com
  • www.mydomain.com

In my.htaccess documents I included code to reroute the non - www variation to the www variation, yet both variations are still receiving Google is search results.

Exists anyhow to have Google just show the www variation?

0
2019-05-13 03:24:05
Source Share
Answers: 3

First, I wish you place a correct 301 redirect for any kind of web page in your htaccess.

If several of your web pages call for parameters, like example.com/?p = 20, after that you require to make use of mod_rewrite with [R = 301 ] as opposed to the less complicated mod_alias Redirect instruction in your htaccess. Additionally, till Google Bot returns and also indexes, it will certainly not upgrade the Google index.

Second, it will certainly spend some time for Google to reindex your internet site. You can attempt and also send a correct sitemap (sitemap.xml) to google using Google Webmaster Tools yet it still could spend some time.

Third, you could intend to make use of a rel=canonical tag on your web pages - specifically if your redirect is not functioning yet to hint Google for correct indexing of your web pages.

0
2019-05-17 15:29:31
Source

A little of an apart, yet why do you still intend to make use of the www domain name? It is no more essential and also includes even more bloat to your url. Look into the no - www task for even more details.

http://no-www.org/

As to your trouble, offer Google at some time to reindex your website and also enjoy that your website is still turning up two times in the outcomes.

0
2019-05-17 14:38:35
Source

In enhancement to Evgeny is great factors, it needs to be kept in mind that the Google Webmaster's tool permits you to define a recommended domain name, either with or without the www prefixes. Google is description of this alternative adheres to:

The recommended domain name is the one that you would certainly such as made use of to index your website is web pages. If you define your recommended domain name as http://www.example.com and also we locate a link to your website that is formatted as http://example.com, we'll deal with that link as if it was http://www.example.com. On top of that, we'll take your choice right into account when presenting URLs in our search results. It might spend some time for adjustments to be mirrored in our index.

You'll locate the alternative under "Site Configurations \ Settings".

0
2019-05-17 13:26:51
Source