Results 1 to 8 of 8
-
04-07-2011, 01:30 AM #1Junior Guru Wannabe
- Join Date
- Apr 2009
- Posts
- 85
Block google from caching addon domain as subdomain
I have a shared hosting account with a root domain like xx.com
Now I have added an addon domain yy.com. But google is caching my addon on domain as both yy.com and yy.xx.com
How can I prevent it from caching addon domain as subdomain.
-
04-07-2011, 01:51 AM #2Web Hosting Evangelist
- Join Date
- Nov 2009
- Posts
- 544
-
04-07-2011, 01:55 AM #3Junior Guru Wannabe
- Join Date
- Apr 2009
- Posts
- 85
I got the solution
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} main-domain\.com$
RewriteRule ^(.*)$ "http\:\/\/www.another-domain\.com\/" [R=301,L]
</IfModule>
-
04-07-2011, 02:11 AM #4Disabled
- Join Date
- Dec 2007
- Posts
- 3,597
I suppose in this case you can use both robots.txt file and nofollow attributes.
Also use XML site maps for proper indexing.
-
04-07-2011, 02:33 AM #5WHT Addict
- Join Date
- Mar 2011
- Posts
- 104
htaccess is better than robots.txt method, but if some things goes wrong in htaccess it will totally prevent google from crawling your site.
To simply put, robots.txt says google to whether index a page or not. but htaccess literally stops google from crawling.█HostGuts.com Professional Web Hosting Services
█Shared, Managed Wordpress Hosting, Semi Dedicated Hosting
█LiteSpeed + CloudLinux + RAID Storage + R1Soft Secured
-
04-08-2011, 01:41 AM #6Junior Guru Wannabe
- Join Date
- Apr 2009
- Posts
- 85
Thanks guyz, I would prefer htaccess, as I dont want even users to be able to access my site as yy.xx.com
-
04-08-2011, 03:46 AM #7Junior Guru Wannabe
- Join Date
- Jan 2010
- Posts
- 36
that's the problem (probably) because of cPanel which set add-on domain as a subdomain of main domain.
you can set up redirect from the subdomain to your add-on domain and you can set up canonical of your prefered domain (so that search engine knows which one is your prefered domain).Please don't assume everyone needs a control panel.
-
04-08-2011, 05:19 AM #8Web Hosting Master
- Join Date
- Jun 2009
- Location
- UK: Oxford
- Posts
- 1,259
Sitemap, .htaccess and robots.txt Very quick, direct answers really but you could also submit your site to other Search Engines other then Google.
█ Garbott Ltd - Exceptional web development, hosting & consultancy services
Similar Threads
-
Any easy way to move a subdomain/addon domain to it's own cPanel account?
By tnedator in forum Hosting Security and TechnologyReplies: 1Last Post: 01-29-2008, 11:30 PM -
Cpanel Subdomain and Addon domain Problem HELP!!!
By CymraegWalesHosting in forum Hosting Software and Control PanelsReplies: 1Last Post: 06-26-2007, 07:54 PM -
subdomain and addon domain
By HD Fanatic in forum Hosting Security and TechnologyReplies: 4Last Post: 09-03-2006, 10:18 AM -
How to prevent redirect from addon domain to subdomain?
By MH123 in forum Hosting Software and Control PanelsReplies: 0Last Post: 02-25-2004, 05:24 AM -
AddOn Domain - Subdomain issues
By HingyGuy in forum Hosting Security and TechnologyReplies: 3Last Post: 11-19-2002, 06:18 AM