Domain IP address for www and non-www for Canonical URL

后端 未结 3 1537
无人及你
无人及你 2021-01-30 08:43

To handle Canonical URL is it best practice to do a 301 redirect or better to have the same IP Address for both www and non www domain?

For example:

Canonical UR

3条回答
  •  无人及你
    2021-01-30 09:09

    You may try redirect.center. Its redirects domains using DNS only.
    So it will fulfill your DNS configurations:

    Domain           | A Record
    ------------------------------------
    example.com      | 192.0.2.34
    *  www.example.com 301 redirect to example.com
    

    set your DNS record to:

    CNAME | www | example.com.opts-https.redirect.center

    Note:
    The .opts-https. parameter redirect to https domain
    If you use only http domain then use .opts-uri.

提交回复
热议问题