My Subdomain is Being Redirected to My Primary Domain

– I have a HostGator account

– I have an addon domain and installed WPMS (

– I created a demo site (

When I go to the demo site, instead of that site showing up, my primary domain shows up.

I can’t figure out how to correct that. I’ve read other sites and I believe it may have something to do with my .htaccess file? I’ve also read somewhere where they say it may have something to do with “www” reference somewhere?

If anyone can provide some assistance I’d really appreciate it. I know it’s probably something very basic. I just can’t seem to figure it out. :disappointed:

  • Alexander
    • DEV MAN’s Mascot

    Hi @samvil,

    Well, I just tried pulling up your demo URL and it doesn’t go anywhere right now. Perhaps you’ve removed it in the meantime?

    To have demo go to a completely separate install, you’ll need to get it it’s own folder. Within cPanel, when you create the subdomain, make sure it creates a new folder for that subdomain. You shouldn’t need any htaccess for this, as cPanel will know to route the subdomain to that folder.

    Just make sure you set the “Document Root” to something unique. This can be done while creating the subdomain, or you can edit it later. Then you can install WordPress to that folder.

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.