Welcome! Log In Create A New Profile

Advanced

Nginx country domain location to subdomain best practice for SEO

Posted by kavkazo 
Nginx country domain location to subdomain best practice for SEO
July 13, 2021 07:44AM
Hi,
Im using nodejs and nginx for website domain.com (english europe) and different languages in subdomains (nl.domain.com, no.domain.com, de.domain.com, es.domain.com, it.domain.com, ... ). Also I have some domains (domain.nl, domain.be, domain.it) but not for all languages. And the question is what is the best way for SEO, Google, ... to location in nginx for ex. domain.nl to nl.domain.com, where I can get full located on NL site actually?
My current nginx.conf:
....
server {
server_name domain.nl;
location / {
proxy_pass https://nl.domain.com;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.nl/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.nl/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
....
upstream nodejs {
server localhost:3000;
}
server {
server_name domain.com *.domain.com;
root /home/folder/site/static;
location / {
try_files $uri @nodejs;
access_log off;
expires max;
}
location @nodejs {
proxy_pass http://nodejs;
proxy_http_version 1.1;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded_For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_cache_bypass $http_upgrade;
}
listen 443 ssl http2;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
....
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready