April 22, 2025
How to Redirect All Pages to the Homepage (Without Creating a Loop)
Sometimes, you want to redirect every page on your website to the homepage — maybe you’re rebuilding your site, turning it into a one-pager, or hiding old content. But if you’ve ever tried this using a plugin like Redirection, you might have run into the dreaded redirect loop. Here’s a simple, loop-free way to redirect all pages except the […]

Sometimes, you want to redirect every page on your website to the homepage — maybe you’re rebuilding your site, turning it into a one-pager, or hiding old content. But if you’ve ever tried this using a plugin like Redirection, you might have run into the dreaded redirect loop.

Here’s a simple, loop-free way to redirect all pages except the homepage — using the free and trusted Redirection plugin for WordPress.


✅ Step-by-Step: Redirect All Pages to the Homepage

  1. Install and activate the Redirection plugin from your WordPress dashboard.
  2. Go to Tools > Redirection.
  3. Click “Add New” to create a new redirect.
  4. Use the following settings:
    • Source URL:
^/(?!$).+
  1. Target URL:
/
  1. Click the gear icon (⚙️) and check “Regex”.
  2. Click Add Redirect.

🔍 Why This Works

The regular expression ^/(?!$).+ tells WordPress to:

  • Match any URL that isn’t exactly the homepage
  • And redirect it to the homepage (/)

That means:

  • /about ➜ /
  • /contact ➜ /
  • But / (the homepage itself) stays right where it is ✅
    No loop. No errors. Clean and effective.

🛠 Want to Exclude Specific Pages?

You can tweak the redirect to exclude certain pages like /contact or /login by using this regex instead:

^/(?!($|contact|login)).+

This setup:

  • Still redirects everything except:
    • The homepage
    • /contact
    • /login

🧩 When Should You Use This?

  • You’re rebuilding your website and want all traffic to land on your homepage
  • You’re switching to a single-page layout
  • You’re hiding outdated pages while keeping your homepage active

Need help setting this up on your site?
Drop me a message — I build fast, frugal, and frictionless websites that just work.

FUZZ UK Logo Shapes

Latest Comments & Posts

FUZZ UK Logo Shapes

WordPress Web Design

What can a website do for you?

Learn more about our web design services and what a well thought out website can do for you.

FUZZ UK Logo Shapes

Website Support

Why will support benefit your business?

Read about our web support services and how can a support subscription is essential for your business.

FUZZ UK Logo Shapes

Website Training

How training your staff can save money?

Find out how our website training for your staff can save your business time and money.

More Related Posts