I have a staging site where we do our work and show to clients. The site was created before I started and it wasn't set up with a disallow / in robots.txt or a meta no-index before it was created, so some pages are showing up in a Google search.

Our staging site URL is formatted like this: staging.sub.example.com. However, one of the links that is showing up in google search if formatted like: staging.example.com/mypage. It's missing the "sub" part. Conversely, the other 5 URLs that appear in the Google search are showing up with the correct "sub" part.

  1. Why did Google index the URL incorrectly for that one page?

    To my knowledge, staging.example.com/mypage was never a valid URL, but somehow, Google is finding it and it's actually referencing the information that is on staging.sub.example.com/mypage.

  2. How do I stop Google from displaying the page with the incorrect subdomain?

  • Does the indexed URL with the incorrect subdomain work? Google does not usually index broken URLs. Commented Feb 6, 2015 at 17:52
  • no it does not ... The link brings you to a 404 page. However, If you put the correct "sub" in front of it, it does work
    – kdub
    Commented Feb 6, 2015 at 17:54

1 Answer 1


You can use Google Webmaster Tools to tell Google which domain or subdomain is the preferred one, I think you can also ask Google to remove a link from its index.

However to do so, you first have to create an account and verify that you are the owner of the site. This is easy as you only have to upload a file to your web root folder (there are other ways).

Here is the link to Google Webmaster Tools

  • Google Webmaster Tools lets you set www or the naked domain as preferred, but I don't think it has any controls over preferences for other subdomains. Commented Feb 7, 2015 at 10:58
  • Ok, I didn't know this.
    – Falk
    Commented Feb 7, 2015 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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