How to disable or enable the REST API endpoint in Yoast SEO

In Yoast SEO 14.0, we introduced a REST API endpoint that will give you all the necessary metadata for a specific URL. This makes it easier for headless WordPress sites to use Yoast SEO for their SEO meta output. In this article, we’ll explain how to disable or enable this feature in the Yoast SEO plugin.

Read more about the REST API head endpoint and what it is:

How to disable or enable the REST API head endpoint

The REST API head endpoint feature is enabled by default. If you don’t want this API on your site, you can easily disable it by following the steps below.

  1. Log in to your WordPress website.

    When you’re logged in, you will be in your ‘Dashboard’.

  2. Click on ‘Yoast SEO’.

    On the left-hand side, you will see a menu. In that menu, click on ‘Yoast SEO’.
    Screenshot of the "Yoast SEO" menu item.

  3. Click on ‘Settings’.

    In the menu that expands, click ‘Settings’.
    Screenshot of the settings menu item in Yoast SEO

  4. To disable the API, use the toggle for ‘REST API: Endpoint’.

    Scroll down to APIs. Find the ‘REST API: Endpoint’ feature. The toggle for this API is enabled by default. Use the switch to disable it.
    Screenshot of the REST API feature in Yoast SEO

  5. If you want to enable the API again, simply switch the toggle back.

    To enable to REST API endpoint again, switch the toggle back.

  6. Click ‘Save changes’.

Did this article answer your question?

Thanks for your feedback!

Get free SEO tips!