301 Redirect to Preferred Domain in WordPress

301 Redirect is super easy in WordPress!

This is sometimes referred to as a server-side redirect.  Use the 301 to set up a permanent redirection. The 301 code means that a domain or page(s) has permanently moved to a new location. The 301 redirection automatically notifies your visitors’ browsers to update their affected bookmarks.  It also automatically redirects search engines from one domain/url to the another. There are many reasons when you might want to do a 301.

Here we are specially talking about setting up a WordPress 301 redirection after you specify a preferred domain.

Recommended: do a 301 Redirect after you have set your Preferred Domain using Google Webmaster Tools. The linked article will also explain why preferred domains and 301 redirects are important for your site’s SEO (Search Engine Optimization).

There are various ways of achieving a 301 Redirect (.htaccess, cPanel).  (See References – bottom of page)

However when I tried to do a cPanel 301 redirect for my WordPress site, I encountered all kinds of errors.

The wonderful support team at Exabytes (hosting company) quickly put me rights.


To create WordPress 301 redirect

Login to your WP admin area >> Settings >> General

In my example shown here, I have installed my WP in the root directory of (add-on) domain “shcredo.com”

However my preferred domain has been now set to the www version.  Hence I want to enforce a 301 Redirect so everything goes to the preferred domain.

So just change your WordPress Address (URL) and your Site Address (URL) to your preferred domain.

301 redirect in wordpress

set 301 Redirect in WordPress


That’s it.



References for thso who must have more:



Enjoyed this post?

Easily subscribe to keep get all new postings via email. No We Don't Serve Spam - Ever!

We respect your privacy

Your Comments? Tips to share?