Answer the question
In order to leave comments, you need to log in
Indexing mirror domains in Google
The site is hosted. My 2nd level domain is attached to it, and also, issued by the hoster, a “service” 3rd level domain. The service one was used until I bought my own. When the worker earned, he registered it in different search engines. I opened a Google account in tools and analytics. Set up a counter.
For a while, everything was as it should be. The search results contained the main domain.
But a few weeks later he was replaced by a "reserve". And only on Google. The rest (Yandex, Bing, Rambler) find the one they need.
There is an entry in robot.txt:
User-Agent: *
Disallow:
Host: sitename.ru
The title in the header contains an absolute link to the main domain.
The rest of the links on the site are relative.
I spoke with the technical support of the hoster, rummaged through the Internet. What I found out is somewhat contradictory.
Can you advise the right way?
- wait until it sticks together?
- edit robot.txt?
- kill service domain?
- redirection (if it is, then what)?
— other?
UPD: All three options are registered in Google tools - main.ru, www.main.ru, service.slu.ru (Moreover, I added the service after it got into the search results). The first thing I did was go there. So in the settings there is an opportunity to select the "Main domain" only from the first two options. Those. with or without www. Chose without www. When I go to the service settings, there is a line in the corresponding field: "Main domain - Only root-level domains"
Answer the question
In order to leave comments, you need to log in
I understand that both domains are directed to the same directory?
In this case, go to .htaccess, create it if not, and write the following there:
RewriteCond %{HTTP_HOST} ^www.techdomain.ru$ [NC]
RewriteRule ^(.*)$ www.your-domain.ru/ $1 [L,R=301]
RewriteCond %{HTTP_HOST} ^techdomain.ru$ [NC]
RewriteRule ^(.*)$ www.your-domain.ru/ $1 [L,R=301]
As a result, when entering techdomain .ru and www.techdomain.ru will redirect to www.your-domain.ru , the same with any page
As written above:
1) Google webmaster tools to select the desired mirror
2) Everything is correct in robots.txt
3) Put a 301 redirect from the mirror to the main domain
The mirror will come and change the main mirror of the site.
In Google webmaster tools (or something like that) it is possible to specify the main domain - I had problems only with c mirrors and without www (aliases). Natural links were indiscriminately from www, although I considered it the main one without it, but I didn’t guess to make a redirect from the very beginning, and then it was scary - and so Google didn’t change the domain in the search results for a year.
The redirect can be done
In the order of “Correctness”
1 by editing the DNS server records (negotiate with the hosting so that it redirects to the main one)
2 by raising the second virtual host and throwing .htaccess there with a 301 redirect to the main
one 3 Google and Yandex have a “Webmaster” panel where you can specify primary and secondary domains
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question