How to fix subdomain showing up in search results

1 replies
  • SEO
  • |
Hi Warriors!

I host with Bluehost, and as you know if you host with them or similar hosting service, all your added domains are set up as an addon subdomain even though the addon domains are treated as stand alone domains.

The problem I want to correct is the fact that I have page URLs showing up in search results that show the subdomain in the URL, and I don't want that.

Example - instead of SERPs showing MyDomain.com/page-name-whatever, the URL is showing up as TheSubdomainName.MyDomain.com/page-name-whatever.

I suppose I could set up 301 redirects for each page such as:
TheSubdomainName.MyDomain.com/pagename1
301 to
MyDomain.com/pagename1
But that seems onerous and inelegant.

I'm not actually conversant with making changes to the .htaccess file, but is there a way to be able to set up a wild card 301in an .htaccess file such that all existing pages and all future pages will be redirected to just the MyDomainName.com/whatever-page from the Subdomain URL version??

Could you provide complete code if you know how to do that?

THANKS!

David
#fix #results #search #showing #subdomain
  • Profile picture of the author JustaWizard
    Anyone have any replies please?
    {{ DiscussionBoard.errors[2172154].message }}

Trending Topics