-1

I have a Django website in DigitalOcean, everything works fine expect routing example.com to www.example.com

I normally fix this using CNAME as the following, and all answers I have found also provide this, but it doesn't work in my case:

Hostname   Alias Of    TTL(Seconds)
www          @         43200

This normally works in GoDaddy, but in DigitalOcean the www.example.com takes me to the welcome to Nginx page.

So how can I get the www.@.com to display the website?

Patrick Mevzek
  • 10,995
  • 16
  • 38
  • 54
Muhika Thomas
  • 128
  • 1
  • 7

1 Answers1

0

To future enquirers, I found a solution.

When using gunicorn and nginx as I have done in DigitalOcean

In /etc/nginx/sites-available/site-name

server {
    listen 80;
    server_name .example.com;

in server_name add .example.com, with emphasies to the . before example.com and make your CNAME record as I had described in the question.

Patrick Mevzek
  • 10,995
  • 16
  • 38
  • 54
Muhika Thomas
  • 128
  • 1
  • 7