WordPress GuideDevelopment → Add Video Background

How to turn off automatic redirects in WordPress (including www)

WordPress often tries to “help” by redirecting URLs automatically—but that behavior isn’t always what you want. Whether you’re trying to stop www redirects, disable permalink guessing, or take full control over SEO routing, here’s how to turn off automatic redirects the right way.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Understand the types of automatic redirects in WordPress

Not all redirects come from plugins or server configs. WordPress has a few baked-in behaviors you should be aware of:

Knowing which type of redirect you’re dealing with will help you choose the right fix.

Disable www to non-www redirects via .htaccess

If your site redirects www to non-www (or the other way around), the rules are often found in your .htaccess file—especially if you’re using Apache.

Locate and edit your .htaccess file

Comment out or remove redirect rules

Look for code like this:

Add a # in front of each line to comment it out, or remove the block entirely.

Test your changes

Try visiting both www and non-www versions of your domain. Use httpstatus.io to verify that no automatic redirect is occurring.

Disable redirect behavior in plugins like Redirection or AIOSEO

If you use a plugin that manages redirects, it could be creating rules behind the scenes.

Identify redirect-related plugins

Go to Plugins > Installed Plugins and check for:

Disable the plugin or update its settings

Use code to stop WordPress’s built-in redirect logic

You can override core redirect behavior using filters in your theme’s functions.php file or a custom plugin.

Disable canonical redirects

Add this snippet:

This stops WordPress from enforcing a single “correct” version of each URL.

Disable permalink guessing for 404s

To stop WordPress from guessing slugs and redirecting on 404 errors:

Disable Yoast SEO Premium automatic redirects

If you’re using Yoast Premium, it automatically creates redirects when slugs or permalinks change.

Turn off the automatic feature

Disable Yoast SEO Premium automatic redirects

If you’re using Yoast Premium, it automatically creates redirects when slugs or permalinks change.

Turn off the automatic feature

Delete existing automatic redirects

Clear all levels of cache after making changes

Redirect changes won’t take effect until caching layers are cleared.

SEO implications of turning off redirects

Search engines rely on redirects to understand how your website is structured and which versions of your pages to show in search results. Disabling automatic redirects gives you more control, but it also changes how your site appears to search engines—and that can affect your rankings.

Here’s what you need to watch out for:

If you do turn off these redirects, it’s important to monitor your site using tools like Google Search Console. That way, you can catch duplicate URLs, broken links, and crawl issues before they hurt your visibility in search results.

Add a custom redirect strategy (for advanced users)

Rather than relying on WordPress or plugins, you can define redirect rules yourself.

Troubleshooting: Redirects won’t turn off

Still seeing redirects? Here’s what to check:

Benefits of disabling automatic redirects in WordPress

Why turn off automatic redirects? Disabling these features gives you more precise control over how traffic and search engines interact with your site.

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.

Additional resources

What is managed WordPress hosting? →

Get details and decide if managed WordPress hosting is right for you.

How to push specific pages in WordPress →

Easily push specific pages from staging to live in WordPress without affecting the entire site.














A complete guide to WordPress shortcodes →

Shortcodes make life easier. Learn how to get started!

Trust us to help you choose the ideal hosting solution

Loading form…