How To Redirect Only Your Homepage

A client recently asked me how to redirect your homepage only and not any archive pages.

It took me a long while to figure it out, so for anyone else who’s searching for it, this is how it’s done. You need to add a line to the start of your website’s .htaccess file.

A 301 redirect won’t work as it will redirect the whole site, so you have to use a RedirectMatch. The code below will redirect the home page only to, but leave any other pages and archives in place for people to come to your site.

RedirectMatch ^/$

There are a couple of reasons you might want to do this, so hope it helps!

17 thoughts on “How To Redirect Only Your Homepage”

  1. Im getting the Error: Too many redirects after trying this… Can someone help me with that? What could be causing this problem??

    1. That’s likely because the domain it’s redirecting to is on the same site, or the domain isn’t set up correctly. Occasionally it can just take time, wait a few hours and then test on a different device, domain DNS changes take a while to fully update.

    1. Hi Nicolai! I only work with sites so I haven’t used Blogger for many years so I don’t know if the solution to that, sorry!

    1. You wouldn’t of course, that’s just an example URL. You would replace that with the site you wanted to redirect to.

Leave a Reply