• Resolved joelmellin

    (@joelmellin)


    Hi!

    I am trying your plugin, but the first thing that is meeting me is the text “Could not connect to the rest API”. How do I solve that?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support daniellaivanova

    (@daniellaivanova)

    Hello @joelmellin,

    The “Could not connect to the WordPress Rest API” error is usually caused by a security plugin or an .htaccess rule that may prevent the connection.

    I would recommend you also review the website’s settings to check if the URLs are properly set up in the Dashboard > General tab and if the issue persists, you may consider contacting your hosting provider for further assistance.

    Best Regards,
    Daniela Ivanova

    Thread Starter joelmellin

    (@joelmellin)

    I noticed that the .htaccess file got changed by the plugin by activation and that it caused the site to crash. What can I do about that?

    Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @joelmellin,

    Upon activating the plugin the following line is inserted into your .htaccess file:

    #SGO Unset Vary
    Header unset Vary
    #SGO Unset Vary END

    The ‘Vary’ header is removed from HTTP responses for several reasons: to correct an incorrect configuration that hinders efficient caching, to optimize cache performance by ensuring that content is stored and served effectively when it doesn’t vary based on request headers, and to simplify caching logic when the Vary header is not necessary or is too complex to manage.

    The error “Could not connect to the WordPress REST API” typically indicates a problem with reaching or communicating with the REST API provided by a WordPress site. While the Vary header can influence caching behavior, it is less likely to be the direct cause of connectivity issues with the WordPress REST API.

    To troubleshoot the problem, you should check the server error logs, ensure that permalinks are set correctly, deactivate security plugins temporarily, and verify that there are no conflicts with themes or plugins. If the issue persists, checking the server’s configuration for handling HTTP requests and responses is something we recommend you to do.

    Best regards,
    Georgio Ganchev
    SiteGround.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Could not connect to rest API’ is closed to new replies.