Skip to content

Redirects

Fernando Lucchesi edited this page Mar 28, 2022 · 6 revisions

Same domain redirects

Redirects are handled through the Sanity CMS by creating a new redirect document. All redirects created are permanent redirects. To create a new redirect:

  1. Type in the old slug without the domain, starting with /, in the From field. Example: /this-is-an/example
  2. In the To field, select the Page that the redirect should link to

Different domain redirects

Different domain redirects are handled in the DNS. There is a dedicated team responsible for doing so, and this can be request by creating a new ticket in 'service now'.

Automatic redirects

All slugs ending with .html are automatically permanently redirected to the same slug without the .html. Example: /this-is-another/example.html is automatically redirected to /this-is-another/example

For developers

Logic implemented in the file _middleware.ts