Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hiz77's avatar

adding www to my sitename url does not work

It sounds silly but I have setup a simple laravel site with forge and digital ocean. one little problem i have is that when i add www. to the URL ( like this "www.sitename.com") I can't access the site. But it is loading only like "sitename.com" Any suggestion? Thanks

0 likes
7 replies
pmall's avatar
pmall
Best Answer
Level 56

You have to add a cname record pointing www to your main site (in the digital ocean domain panel)

1 like
hiz77's avatar

Thanks Snapey, My sites domain name is from Hover and server from digital ocean, both have DNS settings, which one to check?

Snapey's avatar

Sorry I don't know the Forge specifics, but from a Domain name point of view, your DNS entries should have either a *.domain.com entry or a specific www.domain.com entry, pointing to the same IP as your droplet.

If you have changed DNS servers to point to your droplet then you will need to do the same on your droplet's DNS entries

1 like
hiz77's avatar

Yes that's right, Thank you both pmall and Snapey, I added the cname record on the digital oceans cpanel and now working as it should.

Hugoboss82's avatar

URGENT HELP: I'm sorry guys, this is silly, but I'm having the exact same issue, but haven't found a way to make it work, here's what I have done so far:

1- I registered my site with hover. 2- I launched a DigitalOcean droplet using Laravel FORGE. 3- In Forge, I created a site checking the wildcard for subdomains, so my domain is "example.com". 4- Added the "example.com" domain in DigitalOcean control Panel, and then updated Hover DNS to point to DigitalOcean DNS. 5- Added 3 records, two A records with @ and " * " as hosts pointing to the droplet IP, and added a CNAME record with WWW as host pointing to "example.com"

However, when I acces www.example.com, i get "This site can't be reached, www.example.com's server IP address could not be found."

It's very urgent for me to find a solution asap, PLEASE HELP !!

Please or to participate in this conversation.