SEO

IP Canonicalization in Nginx Http/Https

Nginx, SEO
IP Canonicalization in Nginx Http/Https: IP canonicalization is to redirect IP Address to the domain. This actually a part of SEO, so good to have IP canonicalization, but you can't achieve this using shared web hosting. IP Canonicalization in Nginx Http/Https: Add the below block to above of your default server block in your nginx conf file, which is default available in /etc/nginx/nginx.conf This below block works for both http and https IP canonicalization in nginx server. [code] server { listen *:80; listen *:443 ssl http2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate "/etc/letsencrypt/live/ngdeveloper.com/fullchain.pem"; ssl_certificate_key "/etc/letsencrypt/live/ngdeveloper.com/privkey.pem"; server_name 18.218.X.X; return 301 https://ngdeveloper.com; } ...