hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : My domain doesn't work without ww
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

My domain doesn't work without ww

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2010, 04:39 AM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
*

My domain doesn't work without ww


Regards all....

I have a problem... I just setup ed my domain and everything is ok if you type
www.mydomain.com if you type it without www it doesn't work..
In FF and Chrome when you type it without it redirects you to www.mydomain.com/home/username/public_html/ (ofcourse error 404 page)

in IE it just shows error 404 page


Any ideas ???

(Yes I have ns1 and ns2 in my dns)


I compared two domains on the same server httpd.conf virtual host file seems to be the same (of course different serveralias ) and I have A record too

I can ping the domain ... and it resolves to correct IP address but seems to be an apache problem but I am not 100% sure...

Any ideas

Reply With Quote


Sponsored Links
  #2  
Old 03-04-2010, 04:57 AM
erectvps erectvps is offline
Junior Guru
 
Join Date: Jan 2010
Posts: 202
Have you setup an A record for the domain itself?

What does the following give for you

ping domain.com
ping www.domain.com

(or nslookup)

__________________
http://erectvps.com - We care about our customers | OpenVZ US | Level 3 support | Give us try
Twitter: http://twitter.com/erectvps
*New This Week: New SolusVM master VPS*

Reply With Quote
  #3  
Old 03-04-2010, 05:10 AM
madaboutlinux madaboutlinux is offline
Web Hosting Master
 
Join Date: Jul 2009
Posts: 1,495
Quote:
Originally Posted by S4Host View Post

I compared two domains on the same server httpd.conf virtual host file seems to be the same (of course different serveralias ) and I have A record too

I can ping the domain ... and it resolves to correct IP address but seems to be an apache problem but I am not 100% sure...
What is the VirtualHost entry of the domain? It should be like

Quote:
<VirtualHost IP:80>
ServerName domainname.com
ServerAlias www.domainname.com
BTW, make sure you added the domain on the server as domainname.com and not www.domainname.com.

And what is the result of

Quote:
ping domainname.com
ping www.domainname.com
If you could forward the domain name here, people around the world can try access it and will let you know the results.

__________________
Linux WebHosting Solutions
http://linuxhostingsupport.net/blog/
MSN: madaboutlinux@hotmail.com

Reply With Quote
Sponsored Links
  #4  
Old 03-04-2010, 05:11 AM
network82 network82 is offline
Web Hosting Master
 
Join Date: Mar 2007
Location: United Kingdom
Posts: 739
you need to create an A record with the following.
Record Name: @
Record Data: {ip of your webserver}

All it is, is the master dns record for the root of that dns zone.

__________________
SOA/SaaS/Cloud & Hosting Technology Evangelist
Note: Any opinions expressed are my own and not of anyone else or my companies.

Reply With Quote
  #5  
Old 03-04-2010, 05:25 AM
vinu009 vinu009 is offline
Newbie
 
Join Date: Sep 2006
Location: India
Posts: 14
Hello,

I totally agree with madaboutlinux. Yes you need to check the VirtualHost entry in your httpd conf file.

Reply With Quote
  #6  
Old 03-04-2010, 07:14 AM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
This is how it is looking right now.. straneg thing is that same setting is set for different domain on same server .. and it is working...

mydomain.com. 86400 IN SOA ns1.mydomain.com.
mydomain.com. In NS ns1.mydomain.com.
mydomain.com. In NS ns2.mydomain.com.
mydomain.com. In A xxx.xxx.xxx.xxx (my ip)
localhost In A 127.0.0.1
www IN cname mydomain.com.
ns1 IN xxx.xxx.xxx.xxx (my ip)
ns2 IN xxx.xxx.xxx.xxx (my ip)


HTTPD CONF
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /home/USERNAME/public_html


Pinging both with www and without www give me the same ip address

Reply With Quote
  #7  
Old 03-04-2010, 07:18 AM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
NSlookup ...
on both return

For WWW

Name: mydomain.com
Address: xxx.xxx.xxx.xxx (myip)
Aliases: www.mydomain.com


WITHOUT WWW
Name: mydomain.com
Address: xxx.xxx.xxx.xxx (myip)


So I assume that server alias is wrong for some reason ..

Just to be clear I also tried adding alias without www as some person suggested to me .. that also didn't helped (of course I restarted apache after the change)


Last edited by S4Host; 03-04-2010 at 07:19 AM. Reason: New info
Reply With Quote
  #8  
Old 03-04-2010, 07:30 AM
esupports esupports is offline
Junior Guru Wannabe
 
Join Date: Feb 2010
Location: India
Posts: 35
Hello,

Could you please paste me the file content of .htaccess under /home/username/public_html

.htaccess entry might be the reason behind it.

__________________
~Lea, http://esupports.net - "Where Performance meets Promises"
HelpDesk Services | Server/VPS Management | Dedicated Tech Services | Per incident Support | Security Hardening
OnlYPhP:Customization experts for Joomla, Drupal, Wordpress, Magento, Vtiger, Zencart
sales@esupports.net - 24/7 Live Chat Support Available! 15 Minutes Average Response Time!

Reply With Quote
  #9  
Old 03-04-2010, 07:33 AM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
Nope .. there is no .htaccess file under that dir or dir above it.. (I looked trough ssh not ftp to make sure )

Reply With Quote
  #10  
Old 03-04-2010, 08:24 AM
inspiron inspiron is offline
Support Facility
 
Join Date: Jun 2009
Posts: 2,318
You need to make sure an A record, Record name should be www.yourdomain record type A.

__________________
Support Facility | 24/7 web hosting technical support services
Technical support | Server management | Data migration

Technical Articles

Reply With Quote
  #11  
Old 03-04-2010, 10:06 AM
esupports esupports is offline
Junior Guru Wannabe
 
Join Date: Feb 2010
Location: India
Posts: 35
Could you please paste the full virtualhost entry for your domain to check,

__________________
~Lea, http://esupports.net - "Where Performance meets Promises"
HelpDesk Services | Server/VPS Management | Dedicated Tech Services | Per incident Support | Security Hardening
OnlYPhP:Customization experts for Joomla, Drupal, Wordpress, Magento, Vtiger, Zencart
sales@esupports.net - 24/7 Live Chat Support Available! 15 Minutes Average Response Time!

Reply With Quote
  #12  
Old 03-04-2010, 04:58 PM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
Regards

Here is a full httpd config virtual

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName mydomain.com
ServerAlias www.mydomain.com mydomain.com
DocumentRoot /home/USERNAME/public_html
ServerAdmin webmaster@mydomain.com
## User USERNAME # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup USERNAME USERNAME
</IfModule>
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/$
php5_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/l$
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/USERNAME:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/l$
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup USERNAME USERNAME
</IfModule>
CustomLog /usr/local/apache/domlogs/mydomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/mydomain.com combined
ScriptAlias /cgi-bin/ /home/USERNAME/public_html/cgi-bin/
</VirtualHost>

Reply With Quote
  #13  
Old 03-04-2010, 05:12 PM
TowerOfPower TowerOfPower is offline
Web Hosting Guru
 
Join Date: Jul 2003
Location: NC
Posts: 270
You VH config looks fine.

It's probably a dns issue.

What does this return?
dig www.domain.com ANY

__________________
Download Apache Web Server with PHP and MySQL for Windows
Setup Websites and Self-Host in 60 Seconds with Wamp-Developer
DeveloperSide.NET - Telling them to Go Host Yourself!

Reply With Quote
  #14  
Old 03-04-2010, 05:27 PM
S4Host S4Host is offline
Junior Guru Wannabe
 
Join Date: Jun 2007
Posts: 53
Dig

; <<>> DiG 9.3.2 <<>> mydomain.com ANY
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19603
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com. IN ANY

;; ANSWER SECTION:
mydomain.com. 14208 IN A xxx.xxx.xxx.xxx
mydomain.com. 86208 IN NS ns2.mydomain.com.
mydomain.com. 86208 IN NS ns1.mydomain.com.


---------------
--- dig query for ns1.mydomain.com



; <<>> DiG 9.3.2 <<>> @ns1.mydomainname.com mydomainname.com ANY
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10131
;; flags: qr aa rd; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 3

;; QUESTION SECTION:
;mydomainname.com. IN ANY

;; ANSWER SECTION:
mydomainname.com. 14400 IN MX 0 mydomainname.com.
mydomainname.com. 86400 IN SOA ns1.mydomainname.com. my.email.com. 2010022508 86400 7200 3600000 86400
mydomainname.com. 86400 IN NS ns1.mydomainname.com.
mydomainname.com. 86400 IN NS ns2.mydomainname.com.
mydomainname.com. 14400 IN A xxx.xxx.xxx.xxx

;; ADDITIONAL SECTION:
mydomainname.com. 14400 IN A xxx.xxx.xxx.xxx
ns1.mydomainname.com. 14400 IN A xxx.xxx.xxx.xxx
ns2.mydomainname.com. 14400 IN A xxx.xxx.xxx.xxx

;; Query time: 169 msec
;; SERVER: xxx.xxx.xxx.xxx#53(xxx.xxx.xxx.xxx)
;; WHEN: Thu Mar 4 22:25:27 2010
;; MSG SIZE rcvd: 198


I like to mention again that my domain work with www and doesn't work without www (for some people who asked me)


Last edited by S4Host; 03-04-2010 at 05:29 PM. Reason: new info
Reply With Quote
  #15  
Old 03-05-2010, 05:48 AM
madaboutlinux madaboutlinux is offline
Web Hosting Master
 
Join Date: Jul 2009
Posts: 1,495
It is not a DNS issue for sure. What error you see in the Apache configuration while accessing the domain without www

Quote:
tail -f /usr/local/apache/logs/error_log
It could be some kind of redirection OR URL mentioned in the database? It's better you have someone to look into your server since it's difficult for people to guess where a specific entry could be OR where something has gone wrong.

__________________
Linux WebHosting Solutions
http://linuxhostingsupport.net/blog/
MSN: madaboutlinux@hotmail.com

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
i need to know how to make my domain work i bought it from domain.com koltenk0 Domain Names 7 12-23-2008 09:51 PM
Setting up Google Apps to work with domain in Namecheap domain manager Shin Asuka Web Hosting Lounge 0 09-20-2006 07:54 AM
Getting www.domain.com to work along with domain.com? robgct Hosting Security and Technology 3 08-17-2004 01:36 PM
Looking for creative work domain or domain for design company. xyrate Domain Name Offers 6 12-09-2003 10:54 PM
I'll do some work for a domain name... Axel Teflon Employment / Job Offers 6 10-27-2002 01:02 AM

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Domain Name Webhosting.co.uk Sold for $500,000 by Sedo Web Hosting News 2012-11-09 09:51:25
Web Host Domain.com Targets Startups with "Next Great Idea" at TechCrunch Disrupt Event Web Hosting News 2012-05-18 10:56:15
ICANN Publishes Details on Domain Seizure Process Web Hosting News 2012-03-09 15:38:48
Profiting From Domains for Web Hosts, with Christoph Donnemiller of PartnerGate Web Hosting News 2011-10-27 18:52:21
Web Host FlexiHost Launches NZ Domain Lookup and Registration App Web Hosting News 2011-08-31 20:38:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?