◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Development → 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:
- Canonical redirects: WordPress redirects similar URLs (like example.com/page/ to example.com/page) to one “canonical” version.
- www/non-www redirects: These are usually server-level, but some plugins can create them.
- Permalink guessing: If a URL doesn’t exist, WordPress will guess and redirect to the closest match.
- Slug change redirects: Plugins like Yoast SEO Premium can auto-create redirects when you change a post’s URL.
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
- Access your server using FTP, SSH, or cPanel’s File Manager.
- Find the .htaccess file in the root WordPress directory (usually /public_html/ or /www/).
- Back it up before editing.
Comment out or remove redirect rules
Look for code like this:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]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:
- Redirection
- All in One SEO (AIOSEO)
- Rank Math
- Yoast SEO
Disable the plugin or update its settings
- You can Deactivate the plugin to stop all its redirects.
- Or go into the plugin’s settings and disable automatic redirect creation (especially after slug changes or 404s).
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:
remove_filter('template_redirect', 'redirect_canonical');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:
add_filter('redirect_canonical', 'disable_guess_redirect', 10, 2); function disable_guess_redirect($redirect_url, $requested_url) { if (is_404()) return false; return $redirect_url; }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
- Use MP4 format for maximum browser compatibility.
- Keep videos under 5MB—the smaller the better.
- Avoid audio—most users don’t expect sound in a background.
- Use short loops (5–15 seconds) to reduce loading time.
- Always add a fallback image in case the video fails to load.
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
- Go to Yoast SEO > Settings > Advanced.
- Locate “Create automatic redirects when URLs change” and toggle it Off.
Delete existing automatic redirects
- Navigate to Yoast > Redirects.
- Locate the entries related to unwanted redirects (like www to non-www) and delete them.
Clear all levels of cache after making changes
Redirect changes won’t take effect until caching layers are cleared.
- Browser cache: Clear it or use Incognito mode.
- WordPress caching plugins: Use your plugin’s “Clear Cache” or “Purge All” option.
- Server/CDN cache: Flush cache from tools like Cloudflare, or your host’s dashboard.
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:
- Link equity loss: If you’ve built backlinks (links from other websites pointing to yours), but WordPress stops redirecting from the “wrong” URL to the correct one, those links may not pass their full value. For example, if someone links to the www version of your site, and your site doesn’t redirect to the non-www version, Google may treat that as a separate page, dividing your SEO power.
- Duplicate content issues: If your site is accessible at both www.example.com and example.com without a redirect, search engines might see those as two different sites with the same content. That can hurt your rankings, because Google doesn’t know which version to trust or show.
- 404 errors: Disabling features like permalink guessing means that users (and search engines) who mistype a URL will land on a 404 error page instead of being automatically redirected to the closest match. Too many 404s can destroy user experience and may cause search engines to crawl your site less often.
- Canonical confusion: WordPress uses automatic redirects to enforce a single “canonical” version of each page (like choosing with or without trailing slashes). Without these, you might accidentally have multiple URLs for the same page, which can dilute your SEO signals.
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.
- Add manual .htaccess or nginx.conf rules for complete control.
- Use a lightweight tool like Easy Redirect Manager to add only the rules you want.
- Consider server-level configs for performance and clarity—especially on multisite or high-traffic environments.
Troubleshooting: Redirects won’t turn off
Still seeing redirects? Here’s what to check:
- Browser cache: Try a different browser or clear history. Cached redirects in your browser can linger, so open the site in a private or incognito window to test properly.
- CDN or server cache: Flush all layers. If you’re using Cloudflare, Bunny.net, or your host has built-in caching, make sure to purge the cache fully from their dashboard.
- Security plugins: Wordfence, Sucuri, or others might enforce redirects. Check their settings or logs for redirect rules and temporarily disable them to test.
- Hidden plugin rules: Plugins may keep rules in the database even after deactivation. Fully delete the plugin and check for leftover entries in your database, especially in options or postmeta tables.
- Check with a tool: Use Redirect Checker or Screaming Frog to trace redirect chains. These tools help you identify where the redirect starts—WordPress, a plugin, the server, or something else entirely.
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.
- Improved debugging: You’ll spot broken links and 404s more easily when WordPress isn’t silently correcting them.
- Cleaner SEO auditing: Tools like Google Search Console give more accurate reports when guessing and canonicalization are turned off.
- Preserve custom routing: If you’re using custom slugs, front-end frameworks, or headless setups, automatic redirects can interfere with your routing logic.
- Avoid plugin conflicts: Taking control of redirects minimizes the chance of plugins fighting each other or overriding your settings.
Next steps for turning off automatic redirects in WordPress
Disabling automatic redirects in WordPress gives you more control over your site’s behavior and structure—especially when it comes to www redirects, permalink guessing, and plugin-based routing. But it also comes with risks, especially for SEO and user experience, so every change should be made carefully and tested thoroughly.
If you’re ready to move forward, start by identifying the source of your redirect (core, plugin, or server), apply the right fix from this guide, and monitor your site’s performance in Google Search Console and redirect testing tools.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
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!