Www.domain.tld works, domain.tld gives Error 526

Hi,

I have configured the cloudflare DNS as follows:

I have setup the following in nginx:
server {
listen 80;
listen 443 ssl http2;
server_name andre-meyer *.andre-meyer.lu;

    resolver 1.1.1.1 1.0.0.1;
    ssl_certificate     /home/www/certs/andre.crt;
    ssl_certificate_key /home/www/certs/andre.key;

    log_not_found off;
    access_log off;

    location / {
        add_header Strict-Transport-Security max-age=31536000;
        return 301 https://www.andre-meyer.lu$request_uri;
    }
}

server {
    listen 443 ssl http2;

    server_name www.andre-meyer.lu;
    access_log  off;

    resolver 1.1.1.1 1.0.0.1;
    ssl_certificate     /home/www/certs/andre.crt;
    ssl_certificate_key /home/www/certs/andre.key;

    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass         http://192.168.178.10:2368;
    }
}

Now why is the root domain not working?

Hi @mactabilis,

Apologies that you didn’t get a reply before now.

Are you able to try pausing Cloudflare, and checking again to see what the issue is, and see what certificate is presented on both www and the root domain. This may help you narrow down the issue. With Cloudflare paused, you should also be able to troubleshoot the issue on the server more easily and other forums such as StackExchange may be able to help with the server config.