MuhammedArslan öncelikle yardımınız için teşekkürler.
Peki 301 yönlendirmesi, ipv6 desteği sağlamak için ne yapmak gerekiyor acaba?

Sizin verdiğiniz koddan da yola çıkarak örnek bir konfigürasyon dosyası oluşturdum. Her şey sorunsuz çalışıyor fakat bazı kodlar işlev görmüyor.

server {
listen 443;

charset UTF-8;

ssl on;
ssl_certificate /etc/cloudflare-ssl/example-com.pem;
ssl_certificate_key /etc/cloudflare-ssl/secretkey-example-com.key;
include /etc/cloudflare-ssl/options-ssl-nginx.conf;
ssl_client_certificate /etc/nginx/cloudflare.crt;
ssl_verify_client on;

root /var/www/html;
index index.php index.html index.htm;
server_name example.netwww.example.net ;
client_max_body_size 0;

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

location ~* \.php$ {
if ($uri !~ "^/uploads/") {
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
log_not_found off;
access_log off;
allow all;
}

# REMOVE THIS LATER
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

# X-XSS Protection
add_header X-XSS-Protection "1; mode=block";

# Deny access to uploads that are not images, videos, music, etc.
location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ {
deny all;
}
}

server {
if ($host =www.example.net ) {
return 301 https://example.net $request_uri;
} # managed by Certbot


if ($host = example.net) {
return 301 https://example.net $request_uri;
}

listen 80;
server_name example.netwww.example.net ;
return 404;

}


Örneğin alttaki kod sitemi açana kadar noindex yapmak için eklediğim bir kod.
# REMOVE THIS LATER
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";


Bu kod mesela çalışmıyor. HTTP header'i kontrol ettiğimde noindex yazısı yok ama farklı bir kod çalışıyor. Bir türlü karmaşayı çözemedim :)