301 & 302 Redirects How To

How to Create a 301 or 302 Redirect?

301 or 302 Redirect – When you are moving your site to a new domain or shortening the URLs of your web pages to make it more user-friendly or SEO-friendly. Perhaps, you want to temporarily or permanently force your web visitors to land on a specific web page . In such a case, you need to redirect your URLs so that your web visitors do not end up in the wrong place, and instead land on the correct web page. Further, you also need to tell the search engines’ (Google, Bing, and like) crawlers that your site or URL has moved, so that they can crawl it to display or rank it in their search results.

In this short write-up, we will show you how to redirect your entire site or just a web page permanently or temporarily for URL Redirection.

To permanently redirect your site or web page, you need to use 301 redirect and to temporarily redirect, use 302 redirect. Here is how you can do it:

If your site is on Windows Server

  1. Open the IIS from the menu. Or press Windows + R and type inetmgr
  2. In Connections pane, expand Sites
  3. Select your site
  4. Now, from the Home pane on the right, click HTTP Redirect
  5. Check the box “Redirect requests to this destination:”
  6. Enter the destination URL
  7. Select ‘Status code’ to Permanent (301) or Found (302)*
  8. Click Apply on the Task pane on the right to apply the redirection changes

*The HTTP/1.0 initially gave 302 a description phase ‘Moved Temporarily’

If your site in on Linux Server

  1. Create an empty text file with a text editor of your choice and save it as htaccess.txt
  2. Type in the following:
    1. Redirect 301/http://yournewdomain.com/ – (Redirects your entire site permanently)
    2. Redirect 302/http://yournewdomain.com/ – (Redirects your entire site permanently)
    3. Redirect 301/examplepage.htmlhttp://yournewdomain.com/examplepage1 – (Redirects examplepage.html to the new destination permanently)
    4. Redirect 302/examplepage.htmlhttp://yournewdomain.com/examplepage1 – (Redirects examplepage.html to the new destination permanently)
  3. Save the file
  4. Upload this file to the root directory of your old site and rename it to .htaccess

If you have WebHost Manager or cPanel

  1. Login to your cPanel
  2. Navigate to the Domains section
  3. Click on Redirects
  4. Choose the redirection Type
    1. Permanent (301)
    2. Temporary (302)

5.    From the drop-down, select the domain name you wish to redirect
6.    If you want to redirect only a single web page or directory, type in the existing path next to the drop-down
7.    In the Redirects to field, enter the new URL with http:// or https://
8.    Select the appropriate www. Redirection: option
9.    Click Add to create the redirect

That’s it!

If you need help with 301 or 302 redirect, contact us. We are the leading web development company in India, providing quality .NET development, ASP.NET development, Kentico development PHP development, WordPress development, Magento development, and Joomla development among others.

Browse through our site www.conceptinfoway.net to learn more about the web development services we offer.

Recent News Post
.NET Development – For Innovative & Prolific Solutions
Dec12

.NET Development – For Innovative & Prolific Solutions

Need a powerful, secure, and scalable web solutions that look beautiful and offer great productivity? Consider Microsoft .NET...
View More
Helpful Search Engine Optimization (SEO) Tips for Established Websites to Rank Better in 2015
Apr2

Helpful Search Engine Optimization (SEO) Tips for Established Websites to Rank Better in 2015

Whether your business website has been around for a while or whether you own an established business website,...
View More