3

I bought a website with its subdomains registred as 3rd level domain name so main site is e.g. example.com and subdomains e.g. en.example.com, de.example.com, etc.

I deleted subdomains from DNS because I want only example.com but in Google search results there are yet subdomains. What I have to do in order to remove all subdomains from search results? Using search console and submit URLs to remove would be stressful.

Zistoloen
  • 10,036
  • 6
  • 35
  • 59
  • 1
    You say "Using search console and submit urls to remove would be stressful" but that's really your best bet. – Andrew Lott Jul 02 '16 at 10:56
  • 1
    Simply wait. If you removed the CNAME or A record of the sub-domain, it cannot resolve. It is just a matter of time now. Search engines are notoriously slow and it can take weeks or months for your sub-domains to disappear from the SERPs. You did the right thing. Now just drink a cold beer and play with the dog. – closetnoc Jul 02 '16 at 14:14

1 Answers1

1

Maybe instead of going the "stressful" way to remove each and every old URL, simply create 301 redirections from all the en/de.example.com URLs to your example.com.

This is probably a better approach for removing URLs of old subdomains, as eventually Google will find out that all the old subdomains URLs have permanently moved to your new one, and will remove/replace them in its index.

Same time, you can keep driving traffic from old indexed URLs to your site, for as long as they will keep appearing in SERPs, instead of killing all this traffic at once by terminating the subdomains - resulting to a non resolving url.

Keep in mind that time is essential here, as the procedure of removing old URLs from Google's index is slow, whatever way you go.

You can use .htaccess for this.

  1. To redirect from en.example.com/url to example.com/url:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^en.example.com$
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    

  2. To redirect requests for en.example.com/url to example.com:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^en.example.com$
    RewriteRule ^(.*)$ http://example.com/ [R=301,L]
    

Notes:

You will need the DNS back, so the subdomains will keep resolving. You may also want to implement more techniques, like adding entries in your robots.txt, or implement noindex,nofollow's for the old subdomain URLs.

Zistoloen
  • 10,036
  • 6
  • 35
  • 59
FFrewin
  • 375
  • 1
  • 10
  • This will not remove the SERP links to the sub-domains, but rather, ensures they remain. – closetnoc Jul 02 '16 at 14:12
  • @closetnoc: Really? How will it do that? Why google will preserve urls that do 301 to another? – FFrewin Jul 02 '16 at 15:32
  • When you do a redirect 301, the original URL remains in the SERPs even though the new URL is somewhere else. In otherwords, the old URL still resolves and provides content. The OP removed the sub-domains which will remove from the SERPs all URLs to these sub-domains which is what the OP wants. It is just a matter of time. – closetnoc Jul 02 '16 at 15:38
  • @closetnoc, if it's not resolving it can't be a redirect. But even if the domain stops resolving the original URLs remain in the SERPs. Have you changed domains, have you changed urls, your best bet is always a 301 Redirect. This will make pass all old traffic/rank juice etc to your new one. Eventually old urls will disappear and be replaced by the new ones. Google doesn't keep urls that redirect in its index. – FFrewin Jul 02 '16 at 15:43
  • The OP is NOT looking for a redirect, just for the sub-domains to be removed from the SERPs. Sorry. I am very familiar with redirects having 287,000+ at one point. It is always better NOT to have a redirect unless necessary or temporary such as a domain change or a URL format change. Cheers!! – closetnoc Jul 02 '16 at 15:47
  • @closetnoc Will a 301 redirected url be remained forever in Google's index? – FFrewin Jul 02 '16 at 15:53
  • Yes. For a 301 redirect to exist within the index, all URLs within the redirect chain (often just 2) must exist. A 301 redirect is an excellent and necessary tool for so many things. – closetnoc Jul 02 '16 at 15:56
  • As a last friendly recommendation: I think it would benefit you to make some more study about 301 redirects, how and when they can be used, how they affect SEO and how Google treats them @closetnoc – FFrewin Jul 02 '16 at 16:07
  • I fully understand 301 redirects and SEO. I know this topic extremely well. However, my point remains that the OP wants to remove the sub-domains and not preserve them. Not being critical! Not at all!! Just pointing it out so that you can re-examine your answer and adjust as necessary. Cheers!! – closetnoc Jul 02 '16 at 16:15
  • @closetnoc, We exhausted it and looping over. My answer is based on the fact, a 301 redirected url will not be preserved in Google Index for long. G will drop/remove it eventually in the same way it will for a non www to www redirection, a long standing 404 page, or a not resolving one. The OPs case is well suited for handling it with a 301 Moved Permanently redirect for all the old urls, since he doesn't want go the other way of manually removing every indexed url. It's a better choice since, old indexed urls for as long as they will keep appearing in SERPs, will keep driving visitors to him. – FFrewin Jul 02 '16 at 16:26