When you use a custom domain with your Orchard Core site, it'll be available under example.dotnest.net and example.com as well. This is an issue with search engines since they might index the content in a duplicate way.
To fix this, add a feature that when visiting example.dotnest.net redirects the client (with a redirect HTTP header, i.e. Redirect()) to the custom domain version of the given page (e.g. not just example.dotnest.net to example.com but also example.dotnest.net/some/page to example.com/some/page).
To be able to still visit example.dotnest.net if the custom domain is broken for some reason (and to ensure that there's at least one way to access the site via HTTPS) only do this redirect if none of the following criteria are applicable:
The user is logged in.
The current page is the login, registration, or forgotten password pages.
When you use a custom domain with your Orchard Core site, it'll be available under example.dotnest.net and example.com as well. This is an issue with search engines since they might index the content in a duplicate way.
To fix this, add a feature that when visiting example.dotnest.net redirects the client (with a redirect HTTP header, i.e.
Redirect()
) to the custom domain version of the given page (e.g. not just example.dotnest.net to example.com but also example.dotnest.net/some/page to example.com/some/page).To be able to still visit example.dotnest.net if the custom domain is broken for some reason (and to ensure that there's at least one way to access the site via HTTPS) only do this redirect if none of the following criteria are applicable:
Jira issue