www.example.com forces example.com

artichoke

Verified User
Joined
Jan 23, 2006
Messages
43
Location
San Jose, California, USA
As a user, if I add www.example.com to my account, I find that the domain really added is example.com. This is problematic, because example.com resides elsewhere. I want only www.example.com (and subdomains of www.example.com) to be associated with this account.

Does anybody know of a workaround?

I checked the reseller and admin control panels and they seem to provide no way of overriding this.

Rahul
 
You would have to have an administrator edit and change settings in your httpd.conf file.

This file is located at:

/usr/local/directadmin/data/users/username/httpd.conf

Replace username with your username.

After being edited apache webserver would need to be restarted.
 
Chatwizrd recommends editing httpd.conf.

Thanks for the response, but no soup for you! I don't think editing httpd.conf will prevent DirectAdmin from misrouting mail arriving for example.com, or remove example.com from DNS.

I may need to add yyy.example.com instead of www.example.com, then do a

 find / -type f -print | xargs grep yyy.example.com /dev/null

to find all the files in which yyy.example.com should be replaced with www.example.com. I'm hoping somebody has a more efficient solution.

Rahul
 
DA makes the presumption, perhaps incorrectly, that some people will type in www.example.com as their domain name, and so drops it when creating the domain name, and then reads it for webservice. Why? So mail to example.com will still be delivered.

It's easy enough to solve your mail problem if your user control panel has a link for MX Records; you can simply uncheck the checkbox for mail for example.com, and change to a different mailserver.

And creating subdomains is easy, too, though perhaps not intuitive.

You click on Subdomain Management and create (for example joe.www as the subdomain.

The problem occurs if you want to get mail at the subdomain names. That won't work because DA doesn't set up mailboxes for subdomains. If you want mail for the subdomains, then you have to set them up as if they're entirely new domains.

To do that you have to make sure your hosting plan allows enough domains for your needs, and then create, for example, joe.www.example.com as a new domain.

Of course since the main domain is on a different server you'll either have to manage nameservers for www.example.com on the nameservers hosting example.com, or else create all necessary DNS records on the nameservers hosting the zone file for example.com.

Jeff
 
jlasman said:
DA makes the presumption, perhaps incorrectly, that some people will type in www.example.com as their domain name, and so drops it when creating the domain name, and then reads it for webservice. Why? So mail to example.com will still be delivered.

Came across this, and this is bad behaviour from a control panel I think. DA should not assume that its admins are clueless.

For the .no-zone, there are several domains that are "illegal" in the sense that they are names of local or regional government. If a certain local or regional government want to register such a domain, they are given "www.thename.no" instead of "thename.no". That means they will have mail-addresses like mymail@www.thename.no.

We have a few domains like this on an old server waiting to be converted, and if DA refuses to handle what I want, it should be fixed.
 
Hello,

As we know that DA won't let you add www.domain.com, the files you'd need to edit to do the swap are, several, but manageable if you only ever see one of these domains:

email:
/etc/virtual/domains
/etc/virtual/domainowners
/etc/virtual/example.com
/var/spool/virtual/example.com

ftp:
/etc/proftpd.passwd

da:
/usr/local/directadmin/data/users/username/domains.list
/usr/local/directadmin/data/users/username/domains/example.com.*
/usr/local/directadmin/data/users/username/httpd.conf
/usr/local/directadmin/data/users/username/user.conf

dns:
/etc/named.conf (path may vary)
/var/named/example.com.db

user's /home/username
/home/username/domains/example.com
/home/username/imap/example.com
/home/username/mail/example.com

So in all of the above files, the domain would need to be swapped out.
For all directories, check for files or directories inside it with the domain in the name.

Once created and renamed, I don't think DA will give you any problems. It's just the creation that it will chop off the www.

John
 
Just out of curiosity, I tried to add 'www.www.domain.com' to DA, and it seems to strip off only the first 'www.' it finds, so the domain added is actually 'www.domain.com' which is what I wanted.

I didn't check the underlying files, but logically it should all be correct.. :)
 
good idea ;) there's the answer, simple.

If you want www.example.com, enter www.www.example.com

Thanks for the find ;)

John
 
Back
Top