0
Welcome Guest! Login
0 items Join Now

multiple domains under one host account

  • multiple domains under one host account

    Posted 14 years 10 months ago
    • Hi,

      My website was working perfectly for over a year with GoDaddy, but when I switched to Hostgator so that I could host multiple domains under one account, everything went wrong. I created a landing page at www.36hoursinaday.com , with buttons to link to the different websites (for different target markets). I copied the original website to both new domains and then proceeded to make huge content and menu changes to one of the sites (the other one is to remain the same).

      Imagine my horror when after a half day of making changes on the 1st site, I discovered that those changes were mirrored on the 2nd site. No matter what change I make to either site, the same thing happens to the other site so they are always the exact same. I can't figure it out!

      Meanwhile, I've discovered that my SEF page links are no longer working. Although SEF is turned on, the URLS are not search engine friendly. I have renamed the .htaccess files, and attempted to change the "# Rewritebase /" line to "Rewritebase /root folder" in both, but that only produced server errors on every page. I'm at a stand still. Please help!

      Melissa
  • Re: multiple domains under one host account

    Posted 14 years 10 months ago
    • Could you please check whether you have separated database for those 2 sites?
  • Re: multiple domains under one host account

    Posted 14 years 10 months ago
    • Yes! You have discovered the problem. I now know (by talking at length with Hostgator) that I am using only one database. So apparently I need to create a 2nd database so that I can run two different sites.

      But here is the problem... I am extremely new to web design (this is the only site I've ever built) and have no idea how to do this. In fact, I don't even remember how I did it in the first place. I was just figuring things out as I went, much like now. Can you tell me how to create a 2nd database?
  • Re: multiple domains under one host account

    Posted 14 years 10 months ago
    • Some of the procedures may vary from one server to another. I just checked Hostgator. They use Control Panel and have some very detailed help on this matter.

      I would recommend you set up a sub-domain to install your files. You'll also require a 2nd database.

      Here's a link to get you started: support.hostgator.com/articles/cpanel/ho...hen-delete-if-needed
  • Re: multiple domains under one host account

    Posted 14 years 10 months ago
    • Yeah! Thank you! I now have separate databases and have one user to access all of them (hope that's OK). I have also contacted Hostgator to find out how to change which domains point to which databases, and have now done that with the configuration.php files. Woohoo! Everything is working beautifully now. Thank you so much for your help!
  • Re: multiple domains under one host account

    Posted 14 years 6 months ago
    • IMPORTANT CHECK LIST:

      First off, regarding the information provided here, don't let anyone talk you into "simply" using a redirect for your Joomla sites. It ain't gonna' work. And here's why...

      Joomla can not, absolutely WILL NOT function properly with multiple installs if your primary account's site files are located in your public_html folder. In fact, this will probably be true for any site you create. I only work with Joomla, so you better check. Knowing the logic behind it all, I'm pretty sure that's a fair statement to make. The WWW wil always look for an HTML file first and then follow to an index.php file next. Either way, it will be confused. Special ENTRY pages and a REDIRECT are not necessary, will gum up the works and slow the server down.

      Now then, each domain needs its' own sub-folder located below the public_html folder. This is true for dedicated servers as well as shared servers.

      Whether your primary account (primary domain), an ADD-on domain or a SUB-domain, each site must be "pointed" to their sub-folder as the "document root" so the WWW can find them. For the record, the WWW is very strict and picky about these things. As far as I know, no one has been able to find a workaround to this.

      IF your primary domain has a Joomla site installed (or any other CMS for the record) in the public_html folder and NOT a separate sub-folder... once you start adding other domains, even in sub-folders, you'll be throwing all kinds of errors.

      Unless you go through the steps to correct this below, you can't fix them. Don't try. It will be a fruitless endeavor. If your host doesn't have good support for Joomla, you can (and will) go nutso trying to track down what's wrong. Worse, they will instruct you to do things that will destroy your existing site when you toss in the towel and decide they "may" know what they are talking about when you reach sleep deprivation state and can't think straight any more. Spare yourself the grief.

      The good news is, you can fix this in a relatively short time. You just need to get your existing site out of public_html folder and into a separate sub-folder. You can do this painlessly if you follow the guidelines below. It will take one afternoon tops (an hour or LESS if you know your way around your site files). A benefit is it cleans up your file structure tremendously.

      Important Note before proceeding: DO NOT MOVE THE CGI_BIN FILE BEFORE CHECKING WITH YOUR HOST TO DETERMINE WHERE IT CAME FROM!!
        Using Cpanel, Go to File Manager > Navigate to public_html folder

        Create a separate sub-folder in "public_html" folder for your exisiting site through your file manager. Give it a unique name.

        Go to CPanel > Select MySql databases. Look at the current site DB info. It will show where the "document root" is located. You can change it to the sub-folder you just created.

        Go back to File Manager. Select all Joomla site files.

        You can drag and drop these files into the folder you just created OR you can RIGHT-CLICK> Select Move and follow instructions in dialog box to relocate the files to the sub-folder you just created.

        Create NEW .htaccess file for public_html folder.

        You are done now! Pat yourself on the back for a job well done. As long you pointed to the right "document root" folder, your site will be working fine.

        All existing e-mail accounts, databases, etc. are unaffected by this change. If you are uncomfortable with this procedure or don't know which files you SHOULD NOT move, consult with your host.

      For each subsequent domain/site, do the following:
        A) Create a separate sub-folder in public_html folder.
        B) Create a separate database for the install.
        C) Create a NEW USER for the DB with ALL permissions and a NEW/DIFFERENT password for each site. This is very important for security. If one site gets hacked, they could all be toast if you don't take this precaution.
        D) Make sure the "document root" matches the sub-folder as outlined above.
        D) Upload files to above sub-folder
        E) Make sure you have the proper paths statements for .tmp/.logs files and the DB info in the configration.php file in the root of each domain's files. ALSO check the
      public_html/domain_folder_name/installation/sql/databases.ini file. If any of the information is incorrect, fix it now. Otherwise, you'll keep getting 404, 500 errors or misconfiguration errors.
      F) Install as usual
      G) Go to CPanel again. Select Advanced> Error Pages. Make sure you create an error page for each of the listed Error Pages for this domain. There should be a drop down menu for each domain, so it will put the files where they need to go. This is where you can make any customizations you choose or you can opt to use the ones provided, but you MUST create them for each domain. Otherwise, you and your visitors will see a blank page if they encounter an error.
      H) Create separate ftp/e-mail accounts with NEW/DIFFERENT passwords for your new domain.
      I) IF you are having trouble seeing your site or the display is weird, go to the configuration.php file and type in the proper domain name at the variable for your live site immediately under the .logs/.tmp statement. It will look like this " mydomain.com " or " mysubdomain.mydomain.com " depending upon what type of domain you are setting up.

      For benefit of others, IF you don't have CPanel, run, don't walk, to another server. (Godaddy does, I checked). If you do, the majority of reputable (I repeat, reputable) servers are set up to accomodate you (but again, some of their techs don't know it and they get tired of trying to help people "fix" it once broken).

      I began my crash course on all the above on September 12th. I now know more than I ever wanted to about servers, hosting capabilities on shared servers vs. dedicated servers, blah, blah, blah... but everything is up and running smoothly since I took the time to document every step I took and what worked. I also learned that my hosts are going through a "script" and if it isn't in the script, they probably don't know how to fix it. It's best we learn all these things for ourselves now.

      The sad fact is, I ended up instructing their techs (more or less) after a tremendous amount of man hours spent by all, doing my own research and AFTER destroying my site online several times (when I KNEW I was doing it properly) due to their "misinstructions." And to top it off, they said it couldn't be done! :)

      Just don't forget to do a backup. AKEEBA, AKEEBA, AKEEBA. Did I say AKEEBA there? It's free! http://www.akeebabackup.com/

      Hope it helps you avoid a nightmare.

      Happy housecleaning! 8)

Time to create page: 0.095 seconds