What is 301 Redirect?
A 301 redirect is a permanent redirect starting with one URL then onto the next. 301 redirects send site visitors and web crawlers to an unexpected URL in comparison to the one they initially composed into their program or chose from a web index results page. These redirects likewise interface different URLs under one umbrella so web indexes rank the majority of the addresses dependent on the area expert from inbound connections.
The following are two unique URLs that take you to a similar site. That is on account of a 301 redirect. When individuals connect to HubSpot Blogs utilizing either URL, the URL we direct blog traffic to (blog.hubspot.com) holds the internet searcher expert related to inbound connects to either URL.
blog.hubspot.com
http://blog.hubspot.com
Did you see that despite the fact that the second connection has “http://” toward the start of the URL, when you landed at the blog, the URL in your program read “blog.hubspot.com”? It is a direct result of a 301 redirect. And It’s fundamental to set this up so the space expert from inbound connects to the http://address are connected to blog.hubspot.com to improve its search rankings.
A 301 Permanent Redirect permanently redirects one URL to another. Using a 301 redirect .htaccess to send visitors to another URL. And to tell web indexes that a page has moved to the new page will be appropriately filed.
Basic employment of a 301 redirect .htaccess:
After a move to another space, utilize a 301 redirect .htaccess on the old area to send visitors to the new site.
Subsequent to moving old site pages to another site structure, use 301 redirect .htaccess to send clients to the new pages.
Succeeding to consolidating two locales, use 301 redirect .htaccess to guarantee visitors go to the new pages.
You can make a .htaccess document by utilizing the File Manager in cPanel, or by utilizing FTP to transfer a .htaccess record you make with a content manager on your PC.
Note: A .htaccess file is hidden, so you will need to build up the cPanel File Manager or FTP client to see the hidden files.
Developer Tip: After updating or adding the .htaccess file, if the site does not work, then restore functionality by either renaming or removing the file.
Code to Redirect to a page:
Place the following line into your 301 redirect .htaccess file:
“RedirectPermanent http://www.domain.com/old-file.html http://www.domain.com/new-file.html”
Repeat for every page you wish to redirect.
Code to Redirect to a new Domain:
Place the following line into your 301 redirect .htaccess file:
“RedirectPermanent / http://www.new-domain.com/”
Step by step instructions to execute a 301 redirect .htaccess document utilizing the cPanel File Manager:
The cPanel File Manager gives a simple method to make or access a 301 redirect .htaccess record. Here’s the secret:
Step 1: Go to your cPanel.
Step 2: In the Files segment of the cPanel, click File Manager.
Step 3: File Manager opens in another tab. snap the Settings button at the upper right.
Step 4: In the Preferences window, check the Show Hidden Files checkbox. Snap the Save button.
Step 5: The File Manager window currently demonstrates all records, including concealed ones. In the Files board, double tap the public_html item.
Step 6: The substance of the public_html envelope currently display. This is the place your .htaccess record will live. For another site, there isn’t a 301 redirect .htaccess document yet, so you’ll have to make it.
Step 7: Snap the +File button at the upper left.
Step 8: In the New File window, enter the filename as .htaccess and click Create New File.
Step 9: The .htaccess document shows up in the list.
Step 10: Snap once on the .htaccess document to choose it, at that point click Edit.
Step 11: In the Text Editor Exchange box, look down and ensure utf-8 is chosen. At that point click the Edit button.
Step 12: The content tool opens in another tab where the window will be clear since it’s another record. Enter the page or space name redirect code as depicted previously.
Step 13: When you’re finished altering the .htaccess record, click the Save Changes button at the upper right of the Text Editor window.
Step 14: You would now be able to close the Text Editor tab.
Step by step instructions to actualize a 301 redirect .htaccess document utilizing FTP:
Step 1: To execute a 301 redirect .htaccess document utilizing FTP:
Step 2: Make the .htaccess record on your PC utilizing a content tool which also Includes the page or space redirect code as depicted toward the start of this article.
Step 3: Utilize your FTP customer to get to your site and make a point to set your FTP customer to see shrouded documents.
Step 4: Go to the public_html registry.
Step 5: Transfer your new .htaccess record to the public_html catalog.
At the point when the transfer is finished, leave your FTP customer.
Recent Comments