Redirect *.appspot.com to custom domain: Google app engine (Django)

前端 未结 1 1368
半阙折子戏
半阙折子戏 2021-01-25 23:33

I\'m directly putting here some sample code of mine to get better picture.

url.py

(r\'^robots\\.txt$\', \'myapp.views.robots\'),
(r\'^$\', \'myapp.views.home\')         


        
相关标签:
1条回答
  • 2021-01-26 00:34

    If your custom domain is working, add a canonical tag to your pages. This should notify search engines which domain you prefer when same content is available from multiple domains.

    <link rel="canonical" href="https://example.com/" />
    

    https://en.wikipedia.org/wiki/Canonical_link_element

    0 讨论(0)
提交回复
热议问题