homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Virtual CDN Subdomian - Disallow Index
Disallow Indexing of Virtual Subdomain

5+ Year Member

Msg#: 4430740 posted 6:33 am on Mar 19, 2012 (gmt 0)

I have a website with lots of images. I have setup a CDN to store the images in Cloud and am using a CDN Subdomain to map the Cloud server url to display the images on my website.

Since the Subdomain is Virtual, there is no physical robots.txt file to help me disallow indexing by bots.

How do i disallow the bots from indexing the Subdomain.

Primany domian : www.mysite.com
Virtual Subdomian for CDN purpose : images.mysite.com

I want to disallow indexing of images.mysite.com

Please guide.



WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4430740 posted 6:44 am on Mar 19, 2012 (gmt 0)

Whether the subdomain is virtual or not is meaningless, if you can upload a file, which you obviously do with images, you can upload a robots.txt file as well.

If you can't upload a robots.txt file, you certainly couldn't upload an .htaccess file that would make sense either, as both should go in the root docs folder.

You can either put both files on your server or neither, see what I'm saying?

In the event that I'm wrong, happens on occasion, this should go in the .htaccess to stop indexing:
<Files ~ "\.(png|jpe?g|gif)$">
Header set X-Robots-Tag "noindex"

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved