My domain is not working without www infront

So i have now got things up and running, atleast almost. LAMP is set up, domain is bought and i am able to access my site if i write "www.mydomain.org" but not if i only write "mydomain.org". If i remove the www i just get the godaddy site with ads and such (i bought my domain from godaddy). If i use the domain from dyndns everything works like a charm. The distro i use is Ubuntu Karmic.

I have set the reverse dns to my domain (without www like the default domain), i have added the domain as master in the DNS manager and i have configured the virtualhost file in apache to work with the domain. without any files in the root folder i get the index listing and if i just add a standard text file i see the file and whatever is written in it.

So, what is the reason why i am not able to access the site if i remove the www? Can someone tell me or point me in the right direction it would be much appreciated.

I have added all the info i think is useful. If i have to provide more info just let me know.

3 Replies

If you're getting anything GoDaddy, then most likely you're not properly pointing your DNS there to Linode's DNS servers. Could you post your domain name?

I understand wanting to hide your domain name, but giving it up will give someone like me with DNS knowledge to be able to point out your exact issue.

Otherwise I would suggest telling GoDaddy your NameServers are Linodes, then use Linodes DNS manager. Setup Linode DNS to have example.com A record to your linode IP, then CNAME of www to the exmaple.com

@cimeies:

So, what is the reason why i am not able to access the site if i remove the www? Can someone tell me or point me in the right direction it would be much appreciated.
The most likely cause is that you are missing an entry for the plain domain in your DNS setup. It sounds like domains registered with GoDaddy may default to a page they provide if no other address has been set (which I think is annoying marketing setup on their part).

When you enter something like http://www.example.com/foo/bar in your browser, DNS is consulted to convert the www.example.com to an IP address (your Linode's public network address). If instead, you use an address like http://example.com/foo/bar the name that is looked up in DNS (example.com) is different - thus you need two entries to cover both cases, or an alias (known as a CNAME) for one case pointing at the other.

In other words, let's assume that you have your DNS setup and being provided (they house the information) at GoDaddy. I would check with whatever tool they provide for managing the DNS entries of your domain to make sure that both www.example.com and example.com yield the public address of your Linode. That can either be by having two distinct A entries (which provide the same address), or by having one of the two entries refer to the other with a CNAME entry.

You can use a variety of tools (from the command line "host", "dig" or "nslookup" utilities, to various web services) to lookup a hostname to see what DNS information is available on it. I've never used GoDaddy but I suspect it shouldn't be too hard to review your DNS information through some form of admin interface.

Alternatively, if you have set up your domain with GoDaddy as your registrar, but then instructed GoDaddy to point to the Linode nameservers to house your DNS data, you would use the Linode Manager DNS interface to create the entries. It sounds like you may have tried part of this (configuring the Linode side) but given that you're getting a default GoDaddy page for undefined hosts makes me think you never told GoDaddy that you wanted to hold your DNS information on the Linode servers.

Neither mechanism is inherently better (though you may prefer one set of administrative functionality over the other), and in both cases you just need to make sure that lookups for the two names result in the same response - the address of your public Linode.

Of course, all of this just ensures that the web browser knows to talk to your Linode. You then need to have an appropriate web configuration that handles requests made with either name (or at the web request level redirects one to the other), but it sounds like you've got a better handle on that then on the DNS side.

– David

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct