521 error. DNS issues with one domain

What is the name of the domain?

cafemekan.com

What is the error number?

521

What is the error message?

Web server is down

What is the issue you’re encountering

For one of our sites which are hosted on the same server we are getting 521 error

What steps have you taken to resolve the issue?

We have the exact same setting for all our sites on our nginx config file. we can access the site with internal dns without issues, but once we point cafemekan.com to the servers ip address through cloudflare DNS, cloudflare comes up this error.

Out of 14 domains only this one and one more domain is causing issues. Can it be a proxying problem, cause we are sure the nginx is running with internal domains but not the cloudflare ones for these 2 domains. We thought it could be a propogation issues but it has been more than 72 hours anyways. Please help!

Thanks a lot
Hodx

What feature, service or problem is this related to?

DNS records

What are the steps to reproduce the issue?

Point the root ip address to our servers
Navigate to the site and view the error

Does it work if you pause the DNS record? Which SSL mode are you using on Cloudflare?

1 Like

Paused, site doesnt show up at all. SSL setting is: Full (strict)

Please help.
Thanks

Is the DNS record pointed to the correct IP address of the server where your Website is hosted?

Furthermore, this indicates some issue on the origin host and further troubleshooting with your hosting provider regarding connection and if you’ve got SSL certificate or need to renew it as well :thinking:

1 Like

Yup they all point to the same IP address, other sites work but this one doesn’t. We use the edge certificate from Cloudflare, here is what our conf file looks like by the way. One with working example (https://parkgyro.com/), and this one which is not working

    listen 80;
    server_name cafemekan.com www.cafemekan.com;

    location / {
        proxy_pass http://localhost:5002;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 80;
    server_name parkgyro.com www.parkgyro.com;

    location / {
        proxy_pass http://localhost:5002;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}```

Same IP address and CNAME www to root domain
![image|690x192](upload://5U5WsDDBfsa1ouHJf1sjHsIzM4z.png)
![image|690x184](upload://heqWjnUqbYsUustb0XlEfpeWwC1.png)



type or paste code here

Please update your server configuration to use port 443 and SSL.

You can use a Cloudflare Origin Certificate, but your server needs to support SSL:

I could do that but I am getting the same error without https.

http://cafemekan.com also giving the 521 error, so it must be related with something else, no?

Hosted on the same server, provided by the same hosting provider? :thinking:
Might be network issue or maintenance there.

The problem is that you redirect all requests to HTTPS (port 443) but only listen on port 80.

Best fix is to change the server to listen on 443 ssl and add an Origin certificate, shouldn’t take more than 5 minutes.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.