Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have main domain and subdomain called that serves images and other static content. It's once hosted whole domain (, but I moved main domain to other server but all files/scripts/software remained on

Several days ago, I've noticed that Google indexed it and all of the content is the same as on original domain:

How can I remove indexed pages only (leave images and other static content)? Will this be OK:

1) I've uploaded this robots.txt:

User-agent: googlebot-image
User-agent: *
Disallow: /

2) Removed all software/scripts from the site so it's now showing 404. Will 301 redirect be more appropriate?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I've had this happen before when running a subdomain, in that instance I didn't actually need to keep the sub domain so I just deleted it, and it slowly got removed from Google.

What I'd suggest is to make a Google Webmaster Tools profile for the subdomain (separate from the main domain's profile), and then once that's set up go to Google Index > Remove urls (in the side bar) and try removing the pages that you've found indexed.

Again in Webmaster Tools go to 'Crawl > Blocked urls' and see that its reading your robots.txt file correctly; this way you'll be able to see that Google knows to explicitly block your URL.

The only other option I could think of would be to somehow block access to the subdomain to everyone apart from your main site, using .htaccess (I'm not sure exactly the process for this, but someone on here should be able to point you in the right direction).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.