Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've setup a LAMP server with Ubuntu. It's a dedicated server hosted by

Now, I've purchased a domain name and I've created a A registar mapping to my server's IP address

If you browse to this IP address, this will reach my website (the 404 is expected). However, if you browse to the website using the dns

then you end up on a parking page of
I did a dig on the dns and it returns the correct IP address. So I'm not sure what I'm missing here...

Note: that if on my server I browse to the website using the domain name, then it works. So it must be something simple I've missed.

Edit: since it seems to come from my apache web config, here it is :

DocumentRoot /var/www/ePhotograph/web
DirectoryIndex app.php
<Directory "/var/www/ePhotograph/web">
 AllowOverride All
 Allow from All

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ app.php [QSA,L]

share|improve this question
I get a 404. Are you sure it's not just your browser cache that fools you? – l3dx Aug 15 '13 at 12:15
Sounds like you have a local DNS cache issue - works for me. – Oli Aug 15 '13 at 12:16
oups, sorry I just figured out that it works using the dns I've mentioned in this forum, but the one I was fighting with is actually! So, without the www it works but as soon as I add the www, it fails to resolve. What could that be ? – Sam Aug 15 '13 at 12:22
Have you cleared your browser cache yet? – l3dx Aug 15 '13 at 13:06
try with a different browser (or smartphone or tablet or whatever) to verify it's not just browser DNS cache – Cubiq Aug 15 '13 at 13:13

Not working for you, but working for others? Try clearing the browser dns cache.


share|improve this answer
up vote 0 down vote accepted

@Eliah, I cannot edit my original answer as it's been deleted. I'll write it here again because I believe it is the answer:

It was indeed the browser dns cache. You guys were right.

I basically walked away from computer and tried again a few hours later and it just worked. I guess if I had tried with a different browser it would have work too.

Thanks for helping !

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.