Use .htaccess to Redirect All WordPress Links to A New Site Domain – WordPress Tutorial

By | May 12, 2022

In this tutorial, we will introduce you how to redirect all an old wordpress links to a new site domain using .htaccess file. It is very useful to park a domain.


In order to use .htaccess file, you should make sure that you are using apache server. If not, this method will not work.

Use .htaccess to redirect links

We can use code below to redirect all link in an old site in a .htaccess file .

rewriteengine On
rewritebase /
rewritecond %{HTTP_HOST} ^$ [OR]
rewritecond %{HTTP_HOST} ^$
rewriterule ^(.*)$$ [R=301,L]

Run this code, we will redirect all links in or to

Leave a Reply

Your email address will not be published. Required fields are marked *