
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
- Open the IIS from the menu. Or press Windows + R and type inetmgr
- In Connections pane, expand Sites
- Select your site
- Now, from the Home pane on the right, click HTTP Redirect
- Check the box “Redirect requests to this destination:”
- Enter the destination URL
- Select ‘Status code’ to Permanent (301) or Found (302)*
- 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
- Create an empty text file with a text editor of your choice and save it as htaccess.txt
- Type in the following:
- Redirect 301/http://yournewdomain.com/ – (Redirects your entire site permanently)
- Redirect 302/http://yournewdomain.com/ – (Redirects your entire site permanently)
- Redirect 301/examplepage.htmlhttp://yournewdomain.com/examplepage1 – (Redirects examplepage.html to the new destination permanently)
- Redirect 302/examplepage.htmlhttp://yournewdomain.com/examplepage1 – (Redirects examplepage.html to the new destination permanently)
- Save the file
- Upload this file to the root directory of your old site and rename it to .htaccess
If you have WebHost Manager or cPanel
- Login to your cPanel
- Navigate to the Domains section
- Click on Redirects
- Choose the redirection Type
- Permanent (301)
- 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.
Table of Contents
Categories
- Android App Development Company7
- Angular Development18
- AngularJs Development1
- App Store Optimization22
- Apple Watch App Development17
- ASP.NET Boilerplate Development18
- ASP.NET Core Development24
- ASP.NET Development34
- ASP.NET Zero Development24
- C# Development23
- CakePHP Development9
- Codeigniter Development13
- CPANEL4
- Craft CMS Development9
- Cross Platform App Development15
- Custom CMS Development14
- Custom CRM Development5
- Custom Development32
- Dot Net Development30
- Drupal Development16
- eCommerce Website Development Services30
- Google Panda 4.21
- HTML 5 Development11
- Internet Marketing SEO6
- iOS App Development Services11
- iPad App Development56
- iPhone App Development55
- Joomla Development16
- Kentico Development20
- Laravel Development16
- Magento Development Services16
- Managed Services4
- Mobile Application Development Company34
- My SQL Server4
- News67
- Next JS Development1
- Offshore Development1
- Open Source Development65
- OpenCart Development3
- Pay Per Click21
- PHP Web Development65
- Power BI Development4
- Quality Assurance11
- React JS Development1
- Search Engine Optimization36
- SEO India24
- SharePoint Development22
- Shopify Development Agency8
- Social Media Optimization24
- Software Development India15
- Technology14
- UI/UX Design Company10
- Umbraco Development17
- Uncategorized1
- Wearable App Development8
- Web Application Development10
- Web Design and Development32
- WooCommerce Development15
- WordPress Customization27
- WordPress Development Company25
- Xamarin App Development Company11
- Zen Cart Development11

.NET Development – For Innovative & Prolific Solutions
