How to Remove Addon Domain Subdomains from Search Engines

This week, as I was assessing how well a website was indexed by Google, I noticed something very odd. The query site:example.com  revealed subdomains which pointed to addon domains.

Apparently, some web hosts, typically those using cPanel, allow customers to add additional domains, called addon domains. But when these addon domains are created, a subdomain for that domain is created as well. Basically, if a customer wanted to add newdomain.com, the subdomain newdomain.example.com is also created.

Google can find and index all of these subdomains.

Problem: Duplicate Content Is Bad

As we know, Google may penalize a site for having content that is shared or reachable by multiple URLs. So having two paths to a site is problematic. As a result, when these addon domains are created, it is important to redirect the subdomain to the addon domain. Otherwise, it could be very bad for search engine optimization (SEO).

How do I remove a subdomain from Google's index & redirect it to the addon domain?

Removing the subdomain is a simple task: Set up a 301 redirect from the subdomain to the addon domain. Once this is done, search engines will realize that they should not index the subdomain and they will permanently update their index to the addon domain.

Setting up the 301 Redirect

1. Go to the addon domain folder. Navigate to the addon domain directory via FTP or via your control panel's file manager.

2. Edit your .htaccess file. Add the following code to your .htaccess file. If you do not have an .htaccess file, you will need to create one.1 Be sure to edit the highlighed lines to reflect your own subdomain and addon domain.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sub.domain.com$ [NC]
RewriteRule (.*) http://www.sub.com/$1 [R=301,L]
</IfModule>

3. Verify that your redirect works. When you visit the subdomain, you should find that you are automatically redirected to the addon domain. If this does not happen, go back to the .htaccess file and make sure that you entered the correct subdomain and addon domains in the highlighted lines.

 

And that's all. After Google revisits the subdomain, it will be removed  from the index and replaced with the addon domain.

  1. When creating your .htaccess file, be sure to use .htaccess as the complete file name. []
Tags: , , , , ,

1 Response to “How to Remove Addon Domain Subdomains from Search Engines”

Trackbacks

Trackback URL:

Leave a Reply

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com

Go Daddy Deal of the Week: Cheap .COM Domains! Offer expires soon!