Domain Empire

www. works, but http://site.com doesnt

Spaceship Spaceship
Watch
Im working on a new site and I was always checking the site with the www. infront, (its been up for atleast 4 days) but today i went and checked the site without the www. and it is showing:

Great Success !
Apache is working on your cPanel® and WHM™ Server

and a bunch of other stuff about it. How can I make it work?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
i think it is only a problem of browser catches.
nothing else.
 
0
•••
moinuddin102 said:
i think it is only a problem of browser catches.
nothing else.
Agree with you here.
 
0
•••
Hello. Maybe 301 rdirect ;)
 
0
•••
I'm pretty sure the www part is assigned by the web host as your domain is just entered in the registry as domain.com not www.domain.com.
I suggest you check with your web host on this.
Although it may be a propagation issue.
 
0
•••
papa_face said:
I'm pretty sure the www part is assigned by the web host as your domain is just entered in the registry as domain.com not www.domain.com.
I suggest you check with your web host on this.
Although it may be a propagation issue.

That depends. If www.domain.com is in your zone file as an A record (the recommended way), then it's up to you to map non-www to www via a 3xx redirect (as stated by Ahosting.biz). If it's a CNAME record (e.g., an alias), it'll be handled "automagically", but aliasing in the zone file isn't recommended, and you'll even get some nice warnings from dnsreport about it to boot :)

Things can also get messy with url rewriting, another reason you're better off having the www version as an A record and handling everything yourself with mod_rewrite rules.
 
0
•••
You can redirect http://site.com to www and solve this problem.

Code:
#redirect from non-www to www

RewriteCond %{HTTP_HOST} ^(.*)$  [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back