Forums

[resolved] Changing URL of additional WordPress site on a shared hosting (5 posts)

  1. indrago
    Member
    Posted 7 months ago #

    Hello,

    I have a shared hosting account in Godaddy,

    My primary domain on the hosting account is http://www.indrashishghosh.com

    I wanted to run another wordpress site on another domain but on the same hosting plan.

    The new domain, which I also bought from Godaddy, is http://www.indihype.com

    I created a new folder within the root folder of my primary domain called websites/indihype and installed wordpress in that folder and associated indihype.com with it.

    Now when i type http://www.indihype.com into the browser, I am redirected to the new wordpress site, but the URL in the browser looks like : http://www.indrashishghosh.com/websites/indihype

    I cannot get it to change to just http://www.indihype.com

    I tried changing the Site URL from within the wordpress backend, but that just broke my installation.

    Any ideas on what I am doing wrong and what I should be doing?

  2. Josh
    Member
    Posted 7 months ago #

    I think you can add a redirect in your admin panel with Godaddy. I forget what it's called... I quit using them a few years ago.

    Explore your cpanel and check for something like "redirect".

  3. indrago
    Member
    Posted 7 months ago #

    Hey..thanks Josh..I will head over there and see what I can find. Truth is I am new to this and have no idea what I am supposed to do..

  4. Josh
    Member
    Posted 7 months ago #

    Well, I'm sorry I can't remember the name of the option I used before. It's driving me nuts!

    But, you want to "rename" (not literally) http://www.indrashishghosh.com/websites/indihype to show up like http://www.indihype.com/ from your control panel.

    It's like "virtual domain" or something like that.

  5. Go Daddy
    Member
    Posted 6 months ago #

    indrago,

    I *think* I know what the problem is and how to fix it... If I'm right, activating permalinks on the indihype.com site should resolve the issue (permalinks are a setting you can activate in the WordPress admin panel).

    If you're curious, this is what I think is happening:

    Your primary site is in the root of your hosting account. Visiting the primary account, we can see that permalinks are enabled. What's important to understand is that enabling permalinks produces an .htaccess file in your account. This .htaccess file controls how URL redirection is handled for content in the same folder as the file AND any child folders unless that child folder has its own .htaccess file with a rule in it to override the rule in the first file.
    Because your secondary site is in a child folder, it's affected by the .htaccess file in the root. Once you activate permalinks, though, an .htaccess file will be created in its own folder and override the one in the root.

    I don't think you would need to bother, but if you wanted to completely avoid this issue, you would need to treat all domains on the account as secondary/alias domains and use a placeholder name for the primary name. In other words, store all sites in subfolders under the root rather than using the root for one site and storing the rest in subfolders.

Reply

You must log in to post.

About this Topic