Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 07-19-2008, 12:20 PM
EclecticStew EclecticStew is offline
Hatchling Croc
 
Join Date: Jul 2008
Posts: 2
Default addon domain / redirect problem -- please help

I opened an account at hostgator a few weeks ago. I plan to put up a number of completely unrelated sites, each with its own domain name.

To keep things organized, my plan is to put each site in its own subfolder under public_html as follows:

public_html
001-mysite1
002-mysite2
003-mysite3
...

As I purchase domains and put up sites, my thought has been to simply point each new domain to the proper subfolder. Seems simple enough. But I've run into a problem in the addon domain/redirect process.

Here is what I've done so far:

  • purchased mymaingatordomain.com when I set up hostgator account.
  • redirected it to mymaingatordomain.com/public_html/001-mysite1
  • put up site in 001-mysite1 folder
this works fine: when I type in mymaingatordomain.com (with or without www) I go right to the correct page (the address bar shows http://mymaingatordomain.com/0001-mysite1/filename.xxx and I would prefer http://mymaingatordomain.com/filename.xxx to show, but I guess I will worry about that later--at least it works).

  • purchased seconddomain.com from gator (so name servers should already be correct; whois shows ns1 and ns2 at gator, so that should not be any problem)
  • went into cpanel and setup addon domain, redirecting seconddomain.com to public_html/002-mysite2/
  • put up site in 002-mysite2 folder

This is where my problem starts: Now, the only address that actually displays my second site is http://mymaingatordomain.com/002-mysite2/ (with or without www).

Everything else gives me a Network Timeout error, including:

www.seconddomain.com
seconddomain.com
seconddomain.mymaingatordomain.com
mymaingatordomain.com/seconddomain


none of these work.

I notice that cpanel has created a subfolder under public_html called seconddomain that contains only an .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^seconddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.seconddomain.com$
RewriteRule ^(.*)$ "http\:\/\/mymaingatordomain\.com\/002\-mysite2\/" [R=301,L]

I don't know a whole lot about .htaccess or regex, but this looks reasonable to me.

Is there a flaw in my strategy somewhere? Is there something about addon domains or cpanel redirects I'm not getting? I'm not new to hosting accounts (I've had sites up elsewhere for 5 or 6 years), but I am new to cpanel.

Any help would be greatly appreciated.

Brad
Reply With Quote
  #2  
Old 07-19-2008, 01:00 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,130
Default Re: addon domain / redirect problem -- please help

You should not have to set up a redirect for the second domain. If you create the addon correctly it will automatically direct that domain to the seconddomain folder within your account.
Reply With Quote
  #3  
Old 07-19-2008, 01:04 PM
RainbowViper's Avatar
RainbowViper RainbowViper is offline
King Croc
 
Join Date: Mar 2008
Location: St Paul MN
Posts: 814
Default Re: addon domain / redirect problem -- please help

This isn't a complete answer but just a reminder that each domain you purchase, regardless of who you purchase from, will need *UP TO* 72 hours to propagate completely after you point them to Hostgator.

Sometimes they work within minutes or a few hours, sometimes it takes longer. (There are a number of factors involved, and would require a much longer explanation than I can give.)

I'll let more experienced users answer the rest of your questions.

EDIT: squirrelled by GvilleRick, lol.
Reply With Quote
  #4  
Old 07-19-2008, 02:44 PM
EclecticStew EclecticStew is offline
Hatchling Croc
 
Join Date: Jul 2008
Posts: 2
Default Re: addon domain / redirect problem -- please help

GvilleRick - thanks - I'll go back and look at the addon process and see where I might have messed up.

RainbowViper - I registered the domain 8 or 9 days ago, so should be OK on that score, but thanks for your input.
Reply With Quote
  #5  
Old 07-19-2008, 04:52 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,130
Default Re: addon domain / redirect problem -- please help

It can also help to include the domain name that you are having problems with so that we can see if it resolves for us and check the whois record to see if there is some error. I have seen problems in the past where the domain flipflops from resolving to not resolving. It can be due to simple propagation. I've also seen where the HG nameservers were added to the nameservers so that there are old nameservers still listed. Sometimes deleting and readding the addon domain will also fix it as the DNS gets refreshed.
Reply With Quote
  #6  
Old 07-19-2008, 09:37 PM
gwyneth's Avatar
gwyneth gwyneth is offline
Supreme Croc
 
Join Date: Sep 2006
Location: up north
Posts: 6,843
Default Re: addon domain / redirect problem -- please help

Quote:
Originally Posted by EclecticStew View Post
GvilleRick - thanks - I'll go back and look at the addon process and see where I might have messed up.
There's no place to mess up in the "addon process." Either you used the cPanel addon tool, in which case it won't mess up, or you didn't, in which case you don't have an addon domain.

You have made things way more complicated for yourself than they need to be.

Thus, don't create the addon directories manually. Use the cPanel addon tool. Make sure the addon domain works by putting a page in the directory cPanel will create and trying www.addondomain.com--should work every time.

The only reason to use a 301 is to prevent the one-in-a-thousand visitor from accessing your site via www.maindomain.com/addondomain but if somebody tries that, s/he already knows s/he can reach the addon that way.

I believe there is another technique somewhere in an old thread, but if you absolutely do not want the domains ever associated, you should get a reseller account so each can have a separate cPanel.

Last edited by gwyneth; 07-19-2008 at 09:41 PM.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect an addon domain to another addon domain? kitandpup Pre-Sales Questions 1 04-17-2008 05:45 PM
Addon domain redirect help please lumpy50 Webhosting 7 02-28-2008 10:00 AM
Addon Domain without redirect abythebay Pre-Sales Questions 1 12-20-2007 05:45 PM
Addon domain problem, should I wait 24-48 hours before adding new domain? osakka Shared Hosting Support 1 10-01-2006 08:12 PM

All times are GMT -5. The time now is 03:52 PM.