Do I need to disable PHP redirects?

The short answer for most users is:

No. You do not need to disable PHP redirects.


Please let us explain.

The default setting for Yoast SEO Premium is that PHP handles your redirects. This requires no work on your end, except for entering the redirects. If you only have a few redirects your server will be able to handle them quickly using PHP redirections.

However, if you have a lot of redirects (the exact number depends on your server), they may slow PHP down. In that case, it can be useful to let your web server take care of the redirects.

When you go to Admin -> SEO -> Redirects -> Settings you’ll see a toggle to select the type of redirect method you want to use. The default recommended option is ‘PHP’ but you can change to .htaccess (Apache) or ‘Web server’ (NGINX).

  1. Log in to your WordPress website.

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

  2. Click on ‘SEO’.

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

  3. Click on ‘Redirects’.

    The ‘SEO’ settings will expand providing you additional options. Click on ‘Redirects’.

  4. Click on the ‘Settings’ tab.

  5. Select the redirect method of your choice.

    PHP: This is the default option and works with most server configurations.

    .htaccess: This option writes directly to your server. On some Apache servers, your web host may recommend writing directly to this file. Optionally, you can write to a separate .htaccess file.

    Web Server: This option primarily appears for non-Apache servers like NGINX.

  6. Click ‘Save Changes’.

In some cases, you will receive a notification regarding changes that need to be applied to your server to use the selection redirect method. Please make the requested changes to ensure redirects are handled correctly.

Related articles

Get free SEO tips!