Domain always redirects http://www. and never http://

ForthUser

Verified User
Joined
Sep 2, 2009
Messages
12
I have a domain that always appends www. onto the address... even when I type http://domainname.org it automatically takes me to http://www.domainname.org

Under direct admin I have the www record setup to:

domainname.org. A xxx.xxx.xxx.xxx
www A xxx.xxx.xxx.xxx

On the zone record of my domain registrat I have www and A redirecting to the IP address of my website

but still, everything still ends up http://www.domainname.org and http://domainname.org never occurs.

Anyone encounter this before?
 
Its prob nothing with directadmin but a problem with a script being run on the site.
 
floyd : i just wanted to make sure that the ns records are ok (just tested from dnsstuff)

forthuser : check if there is a rewrite module in your .htaccess like this

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,QSA,L]

</IfModule>

It's a common practice for SEO stuff etc.
 
floyd : i just wanted to make sure that the ns records are ok (just tested from dnsstuff)

I am not sure why that comment was directed at me.
 
I am just curious, why does it matter?

It's a preference, and an aesthetic, and a recommendation from the SEO world. WWW is redundant. This has never happened on any of my other sites using the same scripts (wordpress) and using Direct Admin or CPanel.
 
floyd : i just wanted to make sure that the ns records are ok (just tested from dnsstuff)

forthuser : check if there is a rewrite module in your .htaccess like this

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,QSA,L]

</IfModule>

It's a common practice for SEO stuff etc.

Thanks for the suggestion. All that is in my .htaccess is:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
 
There's a reason why we use www as a service name, though these days it appears to be lost in antiquity. But I've never had a problem on a standard DirectAdmin install, with calling up a site without the www. prefix.

For an example, when you try nobaloney.net or http://nobaloney.net, or even http://nobaloney.net/, you still shouldn't get www automatically added. At least my browsers don't add it.

Jeff
 
One thing which i forgot to ask you is if you are using external dns service.
 
Back
Top