Domain only works with www. prefix

Please help, ive set up my domain name using virtualmin but it only works when i put www. before it.

please could you tell me how to make it work without the www.

Hi David,

I’m not sure what to think of that. The default server template creates the domain as domain.tld and then adds a ServerAlias for www.domain.tld. Both names ought to work.

Can you post the relevant VirtualHost section of httpd.conf for the domain in question? The relevant portion of mine for looks like:

SuexecUserGroup "#500" "#500"

You may also want to be sure your DNS is setup correctly. You haven’t specified what error you’re seeing (beware that IE, by default, does not give you the actual error message–it makes one up that is wholly unrelated to the actual error–so if you’re using IE you need to turn off Friendly Error messages before trying to debug any webserver problems), and so I don’t know if you’re getting a hostname not found error or something from the webserver. We’ll need to know more to isolate the problem.

Here is my http.conf for this domain:

SuexecUserGroup "#505" "#504"
DocumentRoot /home/k3wrestling/public_html
ErrorLog /home/k3wrestling/logs/error_log
CustomLog /home/k3wrestling/logs/access_log common
ScriptAlias /cgi-bin/ /home/k3wrestling/cgi-bin/
<Directory /home/k3wrestling/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all

Please can you tell me if this is right?

I’m not sure if it might be a problem with the DNS setup?