Are you trying to create a redirect in wordpress? not sure what is a redirect and why is it important? don’t worry, we have got you covered in this beginner’s A Guide to URL Redirection for WordPress WebSites where we will cover what is a redirect, how to create a redirect in wordpress, why do you need, and when is the good time.
Why URL Redirection is Important for Your WordPress Site
Why take the time to set up URL redirections?
For search engines:
- It’s likely that the old URL structure was indexed by search engines.
- If the new site changes the indexed URL structure, search engines will show pages not found on the next crawl which could hurt your search ranking.
For real people:
- If the old site was around a while, especially if it has useful content, the chances are high that users bookmarked certain pages.
- When the new site is launched with a different URL structure, these bookmarks will show a page not found.
What is a redirect in wordpress?
Redirect is a way for your website to send a quick message to your reader’s browser and tell them that the page they want to visit has been moved, so their browser can automatically point them to the new page of your choice.
There are various different types of redirects such as 301 redirect, 302 redirect, 307 redirect, etc.
however to keep this article simple and useful, we will only cover 301 redirects as that’s the most important.
let’s take a look at why it is important by understanding the use case.
When do you need a 301 redirect in wordpress?
The primary reason to use 301 redirects is when your site or a page on your site has been moved, and you want to point the user to a new page instead.A Guide to URL Redirection for WordPress Sites
This article idea came to us when one of our readers asked us for a way to redirect users from an old post to a new post.
– you need to create a redirect when you are planning on deleting a post or page in favor of new content.
– you need to create a redirect when you are planning on changing the permalinks of your post or page.
why? because not creating a redirect will cause your users to see a 404 not found error. which is not only bad for users, but it can also impact your site’s seo and hurt your search engine rankings.that’s when 301 redirects become very important.
It allows you to tell search engines and your user’s browser that the page they are trying to reach has been permanently moved to a new location.this allows for all your old page’s traffic and backlink (seo) strengths to be transferred on to the new page.
Now that we have covered the why and when of redirects, let’s take a look at how you can create 301 redirects in wordpress using the different methods that are available.
How to create redirects in wordpress (using plugins)
An easier approach to create and manage 301 redirects is by using one of the many wordpress redirect plugins. this allows you to setup redirects without ever writing a single line of code.
The simplest way to add and manage redirects in wordpress is by using the redirection plugin. install and activate the plugin. once activated, visit tools » redirection to setup your redirects.
Redirection plugin not only allows you to setup redirects, it also helps you find out 404 errors on your wordpress site. you can then redirect those urls to an appropriate destination. see this tutorial on how to track 404 pages and redirect them in wordpress.
2. Page links to
Sometimes you may want to keep a post/page, but redirect it to another post or page. this is where page links to comes in handy. this simple plugin adds a meta box on your post edit screen where you can enter the address of the new location where you want to send your users.
3. Simple 301 redirects
Another easy to use plugin is simple 301 redirects. as the name suggests, it makes 301 redirects simple. simply install and activate the plugin and then visit settings » 301 redirects to add your urls.now while setting up 301 redirects using a wordpress plugin is easy, it has some minor performance setback. based on your wordpress hosting provider, your wordpress redirects maybe a bit slower by some microseconds.if you want to make your redirects faster, then you can do so by using the code method and .htaccess file.
Setting up 301 redirects in wordpress using .htaccess.
Using the web server configuration file .htaccess, wordpress users can set up 301 redirects that are fast.please keep in mind that a small mistake in your .htaccess code can make your wordpress site inaccessible, and it may start showing internal server error.that’s why it is important that you backup your .
htaccess file before making any changes.to edit your .htaccess file, you will need to connect to your website using an ftp client. the .htaccess file resides in your wordpress site’s root directory.if you can’t see your .htaccess file there, then you need to force your ftp client to show hidden files. (see why you can’t find .htaccess file on your wordpress site.)you can edit .htaccess file in any plain text editor like notepad.you can add the code above preferably at the end of your .htaccess file.that’s all we hope this beginner’s guide to creating wordpress redirects helped you setup redirects on your site.