September 23 , 2019

How to remove subdomain from google search and redirect to main domain?

remove the subdomain from google search

A domain is simply a part or section of the internet that shares a common suffix or is under the control of the same organisation or individual. A subdomain is a domain which is a part of another domain. Many hosting accounts often allow hosting of multiple sites from the same hosting account. One may add multiple domains to the same main website or domain as the Addon domain from the cPanel. This makes hosting of multiple domains from one single hosting account possible.

However, the problem with this approach is that with every Addon domain created from the cPanel a subdomain is formed automatically. The subdomain this created is joined with the Addon domain and the Addon domain is unable to work without it. This may be the cause of some problems.

When this happens Google fails to recognise them as a part of the same blog and the creator is penalized for having duplicate content. To avoid such complications one must redirect the original subdomain to the Addon domain. Doing so you can avoid plagiarism of contents and also help in optimisation of search engines. Now the question arises How do you remove your subdomain from google search and redirect to main domain?

For that all we need to add the lines below to .htaccess. This way when a search engine reaches our subdomain, it will understand it has been permanently moved to the Addon domain.

RewriteEngine On
RewriteCond %{HTTP_HOST} !your-domain.com
RewriteRule ^(.*)$ http://your-domain.com [R=301,L]
This should work on all shared hosting providers that use cPanel.

More Useful Resource

 Express your comment on this article

Leave a Reply


Grow Your Business

It's time to call your business- a brand!

DOWNLOAD YOUR FREE EBOOK

EXCLUSIVE SECRECT SEO TIPS2019
Your Information will never be shared with any third party