Site Offline or Coming Soon
[resolved] Suggestion: Return a 503 HTTP status code when site offline (2 posts)

  1. David Rowe
    Posted 3 years ago #

    Thank you very much for this plugin.

    When you set the site offline it would be preferable for an HTTP 503 Service Unavailable status code to be returned to the browser instead of HTTP 200 OK. Doing this would signal to Web search indexers such as Google that they should skip reindexing your site at present, i.e., not to index your "site offline" page. Could also be useful to set the Retry-After value.

    For example, update function cp_siteoffline_message() to read ...

    function cp_siteoffline_message()
    $options = get_option('sp_siteoffline_options');
    if ( $options['enabled'] === false ) return;
    if ( !current_user_can('edit_posts') ){
    header('HTTP/1.1 503 Service Unavailable');
    header('Retry-After: 3600');
    echo $options['content'];


  2. wpecommerce
    Plugin Author

    Posted 2 years ago #

    Hi, thanks for the feedback. We just fixed it in the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.