A:Go to the domain name resolution office to set up. Wanwang calls it "explicit URL". Explicit URL: Point the domain name to an http(s) protocol address. When accessing the domain name, it will automatically jump to the target address (for example: after explicitly forwarding www.net.cn to www.hichina.com, access www.net .cn, the address displayed in the address bar is: www.hichina.com).
B:Set up domain name redirection in Apache or Nginx. Keyword, "Nginx domain name redirection".
Well, there are three options, suitable for different situations.
If you are an independent WebServer, you can configure the jump in the WebServer configuration. Common jump status codes are 301 (permanent, the jump result will be cached by the browser for at least 24 hours) and 302 (temporary, jump The transfer results will be cached by the browser for at least 10 minutes).
For example, you can use nginx’s conf or Apache’s .htaccess configuration. Related configurations can be found using the search engine.
If your domain name is registered and is using a domestic smart DNS service , such as CloudXNS or DNSPod, you can configure a resolution record with explicit jump.
Place a index.php 或者 index.html under the domain name you need to jump to. The former can use php to achieve 301 302 jump, and the latter can use html with js to jump to 301 302.
Note that using js to jump may be judged as a violation by the search engine and the authority will be demoted. It may even be judged as a dangerous webpage with malicious jumps.
A:Go to the domain name resolution office to set up. Wanwang calls it "explicit URL". Explicit URL:
Point the domain name to an http(s) protocol address. When accessing the domain name, it will automatically jump to the target address (for example: after explicitly forwarding www.net.cn to www.hichina.com, access www.net .cn, the address displayed in the address bar is: www.hichina.com).
B:Set up domain name redirection in Apache or Nginx. Keyword, "Nginx domain name redirection".
C:Judge jump in the code.
Choose one of three.
You can use DNSPOD forwarding
https://support.dnspod.cn/Kb/...
Well, there are three options, suitable for different situations.
If you are an independent WebServer, you can configure the jump in the WebServer configuration. Common jump status codes are 301 (permanent, the jump result will be cached by the browser for at least 24 hours) and 302 (temporary, jump The transfer results will be cached by the browser for at least 10 minutes).
If your domain name is registered and is using a domestic smart DNS service , such as CloudXNS or DNSPod, you can configure a resolution record with explicit jump.
Place a
index.php
或者index.html
under the domain name you need to jump to. The former can use php to achieve 301 302 jump, and the latter can use html with js to jump to 301 302.