404 Error when we don't add www in the address bar

cnl83
cnl83 used Ask the Experts™
on
I have a domain name that is pointing to a web host that we don't have much control over. Meaning no ftp access or cpanel type of access.

I notice this mostly in Chrome. Is there a zone record I should add so that it does not matter if you type www or leave it out?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jason C. LevineDon't talk to me.

Commented:
You should have two A records.  One for www and one that is blank.  That handles www.domain.com and domain.com URLs
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
First

ping the www domain and the non-www domain - do they have the same IP - if no then it is a DNS problem.
If yes then it is server configuration problem.
If your webserver is configured to look for the domain name with the www (rather than say an explicit www or a wildcard) then it will return the 404 because when it sees the domain in the request header without the www prefix it won't be able to to find a virtual host to match it to
DrDave242Principal Support Engineer

Commented:
You don't have an Active Directory domain with the same name as that public domain, do you?
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Author

Commented:
This domain is managed in a cpanel environment and unrelated to AD.

I have an A record "@" that points to the site ip address.
I have a cname record "www" that points to "mydomain.com".

I tried to add a Cname without the www, but it was denied.
Jason C. LevineDon't talk to me.

Commented:
Can't do a CNAME without a value.  That's what A records are for.

Author

Commented:
So how should the A record look?
Jason C. LevineDon't talk to me.

Commented:
Two records.  One has www. and the other is blank.  Both point to the IP address for the site.

Author

Commented:
I get name is required. Host record field is required.

Author

Commented:
should I try *?
DrDave242Principal Support Engineer

Commented:
Try @ rather than *.
Jason C. LevineDon't talk to me.

Commented:
You need to talk to your registrar.  Something is not right.

Author

Commented:
There is already an @
Principal Support Engineer
Commented:
Ah, I see where you mentioned that now - sorry. If the @ record points to the correct address, the issue isn't in DNS and is likely what Julian Hansen mentioned above: the web server is only configured to process requests for www.mydomain.com and not simply mydomain.com. If you don't have direct control over it, the only option I can think of is to try to contact the person who does control it and ask them to add a host header for mydomain.com to the site. Or simply inform users that they have to include www in the URL.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial