I made a db in my odoo instance that is accessed through xxx.mydomain.com (xxx is a subdomain), recently my customer told me that I need to show his website through his own domain hisdomain.com, I did configure things in my Nginx config file and I created a proxy_pass from hisdomain.com to xxx.mydomain.com, I did this to access to the correct db in odoo through hisdomain.com, I use ^% d$ in my config file, so now I have two ways To acces the xxx Database: hisdomain.com and xxx.mydomain.com, I guess that google going to think that hisdomain.com have duplicate information from xxx.mydomain.com and this will affects SEO.
How can I solve this?
This is my nginx config file:
server {
listen 80;
server_name xxx.mydomain.com;
client_max_body_size 200m;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
add_header Strict-Transport-Security max-age=15768000;
# log
access_log /var/log/nginx/odoo.xxx.access.log;
error_log /var/log/nginx/odoo.xxx.error.log;
# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo;
}
location /longpolling {
proxy_pass http://odoochat;
}
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}
# common gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
server{
listen 80;
server_name www.hisdomain.com;
add_header Strict-Transport-Security max-age=15768000;
# log
access_log /var/log/nginx/odoo.xxx.access.log;
error_log /var/log/nginx/odoo.xxx.error.log;
location / {
proxy_redirect off;
proxy_pass http://xxx.mydomain.com;
}
}
server{
listen 80;
server_name hisdomain.com;
# Strict Transport Security
add_header Strict-Transport-Security max-age=15768000;
# log
access_log /var/log/nginx/odoo.xxx.access.log;
error_log /var/log/nginx/odoo.xxx.error.log;
# Redirect 301 to HTTPS
return 301 http://www.$host$request_uri;
}