FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How to redirect users from FusionAuth 404 error page?

    Scheduled Pinned Locked Moved Solved
    Frequently Asked Questions (FAQ)
    404 themes customization reverse-proxy error-handling
    1
    2
    12
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      FASupportBot
      last edited by

      Users are frequently landing on FusionAuth's 404 error page. Is there a way to customize the 404 page via themes to automatically redirect users to another page, or what are the recommended approaches to handle this situation?

      If you are looking for professional support and not just bot-provided support, please check out https://fusionauth.io/pricing and pick a plan that fits your needs.

      1 Reply Last reply Reply Quote 0
      • F
        FASupportBot
        last edited by dan

        Unfortunately, there is no built-in way to customize the 404 page via FusionAuth themes to force a redirect. The standard theme editor does not include a template for the 404 error page, and this functionality is not currently supported.

        The recommended approach is to:

        1. Investigate the root cause: Try to determine what circumstances are causing users to hit the 404 page. If you can replicate the issue, identifying the source will help prevent it from occurring.

        2. Use a reverse proxy: If you need to redirect users away from the 404 page, the recommended solution is to set up a reverse proxy (such as nginx, Apache, or similar) in front of FusionAuth that can intercept 404 responses and redirect users to an appropriate page. For example, with nginx, you can use the proxy_intercept_errors directive to handle error responses.

        It's generally better to address why users are reaching the 404 page rather than simply redirecting them away from it, as this may indicate an underlying issue with URL construction, deep linking, or session handling in your application.

        Related Documentation

        • Themes Overview - Learn about FusionAuth's theme customization capabilities
        • Troubleshooting Proxies - Important guidance when using FusionAuth behind a reverse proxy
        • 404 Page Theme Forum Discussion - Community discussion confirming this limitation
        • GitHub Issue #404 - Feature request for customizable error pages (consider upvoting if this is important to you)

        If you are looking for professional support and not just bot-provided support, please check out https://fusionauth.io/pricing and pick a plan that fits your needs.

        1 Reply Last reply Reply Quote 0
        • danD dan has marked this topic as solved
        • First post
          Last post