Skip to main content
Last Reviewed: October 10, 2020

Redirects

Avoiding unnecessary redirects to optimize site performance.


Avoid Redirects

A redirect will add at least one extra HTTP request-response cycle. As a result, eliminating extraneous redirects can make your website more snappy. Despite your best efforts it still may be necessary to include the occasional redirect to a primary domain using HTTPS with or without the www.

Other considerations:

  • A DNS service provider such as Cloudflare may allow speedier redirects in some circumstances, but it’s still faster not to redirect at all.

  • Avoid several chained redirects that make small changes such as redirecting to HTTPS, adding or removing WWW, or adding a trailing slash. Instead, redirect to a primary domain that has all of these standardized.

  • Pantheon doesn’t read changes to the .htaccess file or support NGINX customization, so redirects via those methods will not work. For details, see Configure Redirects.

Mobile redirection

To prevent the need for mobile redirects, avoid mobile-specific subdomains and use responsive web design techniques.