Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Web Hosting Forum


You are currently viewing our Web Hosting Forum as a guest. Please register to participate.
Login



Reply
Another subdomain problem and question
Old 04-21-2007, 01:55 PM Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
Hi,

I have a godaddy hosing account and I have several subdomains. My problem is that www does not work in front of the subdomain. I understand that this is improper but everyone mistypes it and I need to make sure they are properly directed to the subdomain.

I have tried several things including the rewrite code below. Here is what happens.

If you type: subdomain.domain.com everything works ok
If you type: www.subdomain.domain.com I receive one of two errors. If I set up a wild card in godaddy’s DNS manager with the same IP as my subdomain I get a 403 error. If I remove the wildcard I get a domain name not found error.

I tried this code to eliminate all www but it still doesn’t work.

RewriteCond %{HTTP_HOST} ^www\.(.+)$
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


Any help would be appreciated because I am beating my head on the keyboard on this one.

Thanks,
John
johnnyk is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2007, 02:21 PM Re: Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
A good example of what I am looking to do is yahoo movies.

If you type www.movies.yahoo.com it will change to movies.yahoo.com and arrive at the proper site.

Thanks again,
John
johnnyk is offline
Reply With Quote
View Public Profile
 
Old 04-21-2007, 05:29 PM Re: Another subdomain problem and question
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I think the redirect is the way you want to go. Try:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.subdomain.yourdomain\.com
RewriteRule ^(.*)$ http://subdomain.yourdomain.com/$1 [R=permanent,L]

I'm not entirely sure that will work, but I think it will.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 04-21-2007, 05:51 PM Re: Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
Thanks for the reply:

I tried your code. I still get routed to this:

http://sea.search.msn.com/dnserror.aspx?FORM=DNSAS&q=www.subdomain.domain.co m

I tried it with and without a wildcard in the subdomain zone dns area. If I use the wild card I sill get the 403 error. Head on keyboard again.

Thanks,
John

Last edited by johnnyk; 04-25-2007 at 02:28 PM..
johnnyk is offline
Reply With Quote
View Public Profile
 
Old 04-21-2007, 06:26 PM Re: Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
This is the response from godaddy.

I don’t believe them!


Thank you for contacting online support. Unfortunately you cannot put 'www' in front of a subdomain.
We apologize for any inconvenience this may cause.
Please let us know if we can help you in any other way.

Last edited by johnnyk; 04-25-2007 at 02:28 PM..
johnnyk is offline
Reply With Quote
View Public Profile
 
Old 04-21-2007, 10:58 PM Re: Another subdomain problem and question
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
of course you can.
What I did on some domains I managed before was to set a A record wich would match the server IP, and set as many cname I wanted, including a www.subdomain.domain.tld

But after this is done, the web server virtualhost config needs to be updated too, to indicate it which request name correspond to which domain.

I don't know godaddy's DNS interface, as I used to use bind on a bunch of linux/bsd servers, but if you want, I should be able to get one dns zone definition with this scheme as an exemple.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 04-22-2007, 06:36 AM Re: Another subdomain problem and question
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Quote:
Originally Posted by johnnyk View Post
This is the response from godaddy.
I don’t believe them!

Dear John,

Thank you for contacting online support. Unfortunately you cannot put 'www' in front of a subdomain.
We apologize for any inconvenience this may cause.
Please let us know if we can help you in any other way.
Sincerely,
Dee F.
Online Support Technician
I'm not familiar with godaddy's interface, but I would suggest that their system will only recognise it with the www prefix if you set your subdomain up as a full domain.

I.e. instead of creating it as a subdomain (e.g. movies.yahoo.com created in their control panel as a subdomain of yahoo.com), you create it as a full domain (still movies.yahoo.com, but independent of yahoo.com - just as though you wanted to host msn.com and yahoo.com).

As you haven't given your domain name, I can't check your DNS zone, but make sure that you've got the CNAME for www.subdomain.domain.com in there...
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 04-22-2007, 11:32 AM Re: Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
I have provided a pic of my DNS control panel. How do I modify the virtual host config? Does godaddy give me access to this file? Is there a way to set up a generic config so every time I add a subdomain it will work with the www?

BTW I called go daddy and the guy on the phone said that it probably could be done although the DNS panel but they don’t support my type of request therefore I was on my own.

Thanks again,
John

Last edited by johnnyk; 04-25-2007 at 02:26 PM..
johnnyk is offline
Reply With Quote
View Public Profile
 
Old 04-22-2007, 10:23 PM Re: Another subdomain problem and question
Novice Talker

Posts: 12
Trades: 0
I also tried a DNS redirect. I put in an entry where www.subdomain was redirected to subdomain.domain.com. I got the following error. I am very confused I thought this should have worked?

Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at AppStuffPort 80

Last edited by johnnyk; 04-25-2007 at 02:27 PM..
johnnyk is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Another subdomain problem and question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40732 seconds with 12 queries