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\')
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