Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:51:06+00:00 2026-05-28T18:51:06+00:00

For SEO purposes, we would like to change the HTTP status code returned whenever

  • 0

For SEO purposes, we would like to change the HTTP status code returned whenever the backend machine behind nginx goes down for some reason.

We would like to change this to “503 Service Unavailable”. As well as provide a Retry-After header to indicated to Google / Bing that the request should be retried in X number of seconds.

Is this possible via nginx?

I am not talking about a custom error page, but rather the status code returned in the header.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:51:07+00:00Added an answer on May 28, 2026 at 6:51 pm

    I think you will have to set up a specific error page, however you can achieve what you’re looking for if you do. Try this:

    location / {
        proxy_pass http://backend;
        proxy_intercept_errors on;
        error_page 502 503 504 =503 @proxyisdown; # always reply with 503
    }
    
    location @proxyisdown {
        add_header Retry-After 500 always;
        index my_pretty_error_page.html; 
    }
    

    If you work it this way you should be able to return the 503 (that’s the =503 part of the error_page directive) and retry-after headers with the benefit that your visitors will receive a nicely formatted “oops, we’re currently experiencing problems, try again in a few minutes” page rather than a blank “503 you don’t really know what this means” page. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our SEO team would like to open up our main dynamic search results page
Why would you not use https on your public facing website? For SEO purposes?
I have this line of code I use for SEO purposes. The only thing
I would like to be able to change the page title with PHP. Now
Would using <p> tags nested in a <h1> tag be bad for SEO purposes?
I have a bunch of RewriteRules in .htaccess for SEO purposes. Sample... RewriteEngine On
are multi-level CSS drop-down menus a big 'no-no' for SEO purposes. i've read mixed
Currently I have a url like this http://<client_name>.website.com/index.php?function_name&cat=32 I want to set things up
I have a website mywebsite.com and I would like to do a 301 redirect
Programmatically, which is better for SEO purposes: defining web page titles client side (e.g.,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.