Question

Does not work without the WWW

  • Posted April 11, 2014

Hello everyone. I’m kind of newbie in both VPS and Ubuntu LAMP server configuration. Just followed some community tutorials on how to instal ubuntu and then apache, php, mysql, etc. My goal is to have some domains hosted in the same droplet so I followed the virtual hosts tutorials.

The problem is that my domain is working with the WWW but it’s not working without it:

http://www.xcuse.me/ working http://xcuse.me/ not working

After reading a lot, I haven’t found anything similar to this. Can someone help me? Thank you so much!

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

That is the proper way to fix it :) Glad to hear it’s working properly now!

Hello Kamal. Thank you for your help! <br>I think I got it to work now. <br> <br>I had 2 virtualhosts … the default one and the one for xcuse.me <br>In the default one, the document root was pointing to /var/www and I changed it to /var/www/xcuse.me/public_html and it’s working now. Don’t know if it is the best way but I’ll move on now :) need to prototype this app asap hehe <br> <br>Thank you again for your help (and edwingonzales1123 too). <br>

Please pastebin your virtualhost config.

Thank you edwingonzales1123! <br>I already have that (followed the tutorials) but the problem is exactly the oposite. It works fine if I put the “WWW” but it doesn’t work if I just type “xcuse.me”, it shows the directory contents from the /var/www folder. <br> <br>

In the DNS settings create an ‘A’ record with hostname: ‘@’ and IP Address: <your ip address>. ‘WWW’ should be set as ‘CNAME’ record of ‘@’