Setup 301 Redirect in WordPress Without Plugin

How to Setup 301 Redirect in WordPress Without Plugin

301 Redirect is a way to redirect the traffic from one site to another permanently. Also, it passes the search engine ranking to redirected site. Besides, I found there are many of people who are looking for 301 redirects and How to Setup 301 Redirect in WordPress Without Plugin. However, I also wrote an article on 301 redirects earlier. If you haven’t read it yet then you can check the link given below:

Apart from this, I got many queries from my visitors asking me about How to Setup 301 Redirect in WordPress Without Plugin. Besides, I recently got a comment from my visitor Ms. Shweta asked me “How to Setup 301 Redirect in WordPress Without Plugin”. So, I thought instead of telling her individually, why not to write an article on it. Also, it will helpful for others who are looking for the same thing. This is reason today I write this article and I will explain How to Setup 301 Redirect in WordPress Without Plugin.

See Comment at Below:

Comment on the Article: What is 301 Redirect and Why You Need It

Let’s start.

How to Setup 301 Redirect in WordPress Without Plugin

 

If you have some extra WordPress site or blogs which are unusable then your backlink will get wasted. But if you redirect your site to another site without losing SEO and traffic, then your backlinks will not get wasted.

However, There are a lot of techniques of Redirections such as 301 Redirect and 302 Redirect.




  1. 301 Redirect: It is permanent redirect which from one URL address to other.
  1. 302 Redirect: It is temporary redirect which also direct visitors from one URL to another but for a temporary basis. It usually used when a site goes under some maintenance for some time.

We will discuss how we can set up both the redirections on WordPress site or blog.

  • How to Setup 301 Redirect in WordPress Without Plugin

It is very easy to How to Setup 301 Redirect in WordPress Without Plugin. You just need to follow the steps given below:

  • Firstly, Login to your WordPress site which you want to redirect to another website. For instance, I have a WordPress site name Clickyupdates, which I want to redirect to my WordPress blog SeoRamanArora. So, I will open WordPress Dashboard of Clickyupdates.

  • Now,  Go to Appearance >> Editor >> Header.php
  • Here add the code in the header.php file where the head tag is started <head>. Such as I have done for my blog clickyupdates

Paste the Code written at below.

<?php

header(“HTTP/1.1 301 Moved Permanently”);

header(“Location: https://www.seoramanarora.com/”);

?>

In Location, you have to write the URL address of your site where you want to redirect your site traffic and backlinks.

In this way, you can Setup 301 Redirect in WordPress Without Plugin. This will permanently redirect your site to another site without losing SEO.

  • 302 For temporary WordPress Blog/ Site Redirection

Now ee will discuss how to redirect your WordPress blog to another blog for some time or temporary. Go to your WordPress Website

Follow the steps given below:

  • Firstly, Go to your WordPress Website which you want to redirect to another website.

  • Now Go to Appearance >> Editor >> Header.php
  • Here add the code in the header.php file at the same place which I have told you above.

Paste the Code written at below.

<?php

header(“HTTP/1.1 302 Moved Temporary “);

header(“Location: https://www.seoramanarora.com/”);

?>

As I told you above, location will display where you want to redirect your WordPress site.

That’s all. I have told you how you can move your WordPress blog/site from one to another both permanently or temporary.




Do you know you can also redirect your WordPress posts from one URL to other?

 

Yes guys, now you can also redirect traffic and backlinks of one WordPress post to another without any plugin. Assume, your post contains too many broken links, then you will more likely to lose your visitor soon. In that case, you can temporarily redirect your WordPress post to another post. Meanwhile, you can find & fix broken links of your post. After fixing the dead links, you can again redirect to your post to previous one.

Check Out:

Let’s discuss how to redirect one post to another post in WordPress.

  • How to Setup 302 Redirect for WordPress Posts

Follow the steps given below:

  • Login to your WordPress Dashboard.
  • Next, Go to Posts >> All Posts




  • Click on the text mode in the Text Editor. Find related article article and copy their link. Paste it in Location to redirect the traffic to other post.

  • Next, paste the script given below at the top of the text editor.

<script>

window.location=”https://www.seoramanarora.com/ad-campaign-in-google-adwords/“;

</script>

In the Location: Enter URL address of the WordPress post where you want to redirect your post.

As I told you above, This is a temporarily WordPress post redirection, use you can remove this after the changes.

Besides this, you can also permanently redirect a WordPress post or article to other. Let’s discuss how you can do it.




  • How to Setup 301 Redirect for WordPress Posts without Plugin

 

Ther are few steps which you have to follow:

  • Login to your cPanel.
  • Find the .htaccess file in the root directory of your site.
  • Select the file and click on edit to open the file. Now paste the following code in the file:

 

RewriteEngine On

Redirect 301 old-post-url new-post-url

That’s all. Now I have told you everything about How to Setup 301 Redirect in WordPress Without Plugin. So, go ahead and try these on your WordPress site. Above all, I will suggest to backup your file before you do some changes on it.

Related Articles:




Final Words

 

I tried my best to deliver the information through this article. Also, I hope you find this article “How to Setup 301 Redirect in WordPress Without Plugin” helpful. Besides, If you like this article, don’t forget to share this post on social media. Moreover, you can Keep in touch with me on Facebook, twitter, Instagram, LinkedIn, Tumblr and Google+. Additionally, You can subscribe to my YouTube Channel for more updates.

Do you have any Query?

Leave a comment below.

Leave a Reply

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