Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3641 Lượt xem

Odoo 14 multidomain works for the domain mydomain,ext but does not work with domain starting with www


how can I add both of www.mydomain.ext and mydomain.ext to be forwarded to the selected website?


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

This can easily be done from your dns configuration with cname. Or you can use nginx to redirect www to the naked one. Either way is ok. 


CNAME is used for resolving domain to other another domain - as an alias. CNAME records are often used to point to a host or to point the "www" version of the domain to the naked domain. This record is fairly popular for web development platforms like Wix and Squarespace. Since CNAME is an alias record, it can be a bit confusing and also be damaging if not used properly


Nginx config you add this


server {
    server_name  www.domain.com;
    rewrite ^(.*) http://domain.com$1 permanent;
}



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

I recommend you to use a reverse proxy and to permanently redirect one to the other. This way you can also avoid that your website is indexed twice by the search engines.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 25
2028
2
thg 6 25
655
0
thg 2 25
1215
3
thg 10 24
1725
0
thg 6 24
1307