+321 123 4567
info@test.com
  • Home
  • My Services
    • Web Design
    • Web Development
    • Technical Writing
  • Portfolio
  • My Thoughts
  • Free Tools
    • Photo Editor
    • Avatar Generator
    • Email Migration Tool
    • QR Code Generator
    • RSS to HTML Converter
    • IP Address Geolocation
    • Base64 Image Encoder
    • NATO Translator
    • All Tools
  • Contact
Home
Web Hosting
Redirect Subdomain to Addon Domain to Avoid Duplicate Content on Google Search

Redirect Subdomain to Addon Domain to Avoid Duplicate Content on Google Search

Wale Adekile
June 17, 2012

The other day I ran some weird google search and saw something that looked rather scary – my sub domain which actually poited to my addon domain was indexed on Google search. Let me make this clear, doncaprio.com is an addon domain on 9jaclub.com. As you know, an addon domain is a subdomain using a custom domain name.


My hosting account is registered with 9jaclub.com and this is the main cPanel domain. I can create unlimited addon domains but when creating an addon domain, a subdomain is always created in the process.

This blog is actually doncaprio.9jaclub.com using doncaprio.com as custom domain. What most webmasters fail to know is that when your blog is available on both address, you can be penalized for having duplicate contents as both are treated as different blogs by google. Once you create an addon domain, you must redirect the original subdomain to the addon domain. If you fail to do this, you’ll have duplicate conetents and I tell you, it isn’t good for SEO.

How do I remove my subdomain from google search and redirect to addon domain

You only have to do a 301 redirect and when search engines reach your subdomain, they’ll understand it’s been permanently moved to the addon domain.

how to redirect subdomain to addon domain to avoid duplicate content on google search

– Log in to cPanel


– Navigate to our addon domain directory

– Edit your .htaccess file and in the very last line, add the piece of code below:

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^doncaprio.9jaclub.com$ [NC] RewriteRule (.*) http://www.doncaprio.com/$1 [R=301,L]

</IfModule>

– Save the file and check your subdomain to see if it redirects or not.

– Be sure to change the following:

doncaprio.9jaclub.com – Change this to your original subdomain that points o the addon domain


www.doncaprio.com – Change this to your real addon domain

As time goes on, the subdomain will be removed from google index.


Previous Post
How to Share Your Computer Network Connection with iPhone / Android / Symbian Phone / other PCs
Next Post
Adding Pagination (Numbered Navigation) to MobilePress
Wale Adekile
Husband to the world's most beautiful woman and father to two awesome kids. A nerd, obviously; also, a technical business analyst, a web designer who preaches the gospel of WordPress, and a writer. You can check out my published books on Amazon.
man using a computer
Web Hosting

Choosing the Most Suitable Web Host

8 years ago
how to choose a cheap and reliable web host
Web Hosting

How to Choose a Cheap and Reliable Web Host

13 years ago

Recent Articles

wahl rapic clip hair clipper
Wahl Rapid Clip Hair Clipper Review: DIY Made Easy
BenQ LaptopBar Review: Luxury or Necessity?
yunmai easepro unboxed
Yunmai EasePro Massage Gun Review
g20
Teendow G20 Robot Vacuum and Mop Review
bathroom
Dear Men, Spraying All Over the Toilet Seat is Disgusting and Irresponsible
winx mediatrans
How to Transfer Photos from iPhone to Computer Without iTunes
google workspace
How to Migrate Emails From Google Workspace/G Suite to cPanel
synology diskstation ds920+
Synology DiskStation DS920+ Review
playstation 4
Why I haven’t Upgraded to the PlayStation 5 Yet
pain
Started Watching Anime as an Adult? You’re Not Alone

All contents on this blog are copyright protected and cannot be reproduced on other websites without permission.

Copyright © 2022 – NerdieDad | Home | Contact | About | Privacy Policy