I have a hosting account with domain.com and we are hosting about 5 different websites. I have 5 folders in the hosting account each one with a unique folder name and of course 5 different domains assigned to each of those folders. Each site works but sadly on the main domain the folder names are visible in the Google search results, for example:

Example of folders being incorrectly indexed in Google Search Results


  • How can this be resolved?
  • How can this be prevented?
  • Hi @John you should mark the correct answer or post the correct one to help the community move on
    – Raul Reyes
    Mar 7, 2016 at 22:10

2 Answers 2


This is just another case of two or more URLs pulling up the same content. You have two ways you can handle this:

  1. Do a 301 redirect from the URLs you do not want to show in the search results to the one that you do want to show.

  2. Use canonical URLs

<link rel="canonical" href="http://www.12345.com/example.html" />


Without more info about your hosting situation i am unsure if this would work, but here is a stack that will try to force redirect-canonicalize all host/sub/domain/ip instances into http://www.addon-domain.com:

RewriteCond %{HTTP_HOST} ^123\.123\.123\.123 [OR]
RewriteCond %{HTTP_HOST} ^www\.123\.123\.123\.123 [OR]
RewriteCond %{HTTP_HOST} ^d5151150\.host-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.d5151150\.host-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^addon-domain\.my-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.addon-domain\.my-domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^addon-domain\.com$
RewriteRule ^(.*)$ "http://www\.addon-domain\.com/$1" [R=301,L]

If you encounter the platform install path showing once the domain is redirect-canonicalized, then this is a different issue -- you should use a rewrite for that or make the addon (and util sub) "live" in the install folder of said platform.

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.