Updated On: April 16, 2021 By Sandipan Pramanick | Catagory: SEO | Tags: Info
If you are searching for what is redirect? how to use redirect? why need a redirect? Then you are in the right place. I will describe every detail about redirect. Hope this post will solve your problem.
There are so many things to cover up in this post. I will describe it in short but hope it will be helpful for you.
So, let’s jump into the topic.
Redirect is the way to sent users and search engines to a different URL from the requested one. Redirection is the process of forwarding one URL to another URL.
Let’s discuss this type of redirect in detail:
301 redirect is the permanent redirect. 301 redirect is the way to sent users and search engines to a new URL from the original requested URL. 301 is the server-side redirect.
You can use this for your SEO work. This is the best method for implementing redirects on a website.
For an example:
www.website.com/oldurl to www.website.com/newurl
You can do this via 301 redirects.
You can implement 301 redirects for various cases. You can use it as an SEO tool.
302 redirect as common as 301 redirects and are considered a “temporary relocation”. You can use 302 redirects when you change the content/page temporarily.
301 redirects and 302 redirects can do the same work, but 301 redirects pass the strong signal to the search engines. So, 302 redirect is truly temporarily redirecting.
You can implement 302 redirects for various cases.
300 redirect is multiple options redirects. You can redirect multiple resources from the original one. It’s rarely used.
You can implement 300 redirects for various cases.
Meta refresh redirect is a client-side redirect. Unlike 301 and 302 redirects that happen on the webserver, a meta refresh redirect instructs the web browser to go to a different web page after a specified period.
This type of Redirect is not recommended unless you access the .htaccess file.
<meta http-equiv="refresh" content="2; URL='https://website.com/blog/content' />
The number (2) is the amount of time in seconds before the browser redirects to the specified URL.
101 redirect is a protocol change that used to be more common for things like HTTP to HTTPS.
Clear first thing first. 301 redirect and rel=”canonical” both are different. Do not use rel=”canonical” as a substitute for 301 redirects.
Both are important and both have different purposes for work. Don’t mix it.
301 redirect is a permanent redirect that sends users and search engines to a new page from the original requested.
rel=”canonical” is an indication or order for search engines to which page they need to index. We use it to avoid the duplicate issue.
If you are still confused, read about Canonical Tag.
If you are using CMS platforms then you will get more options for redirects. You can handle redirects easily from CMS.
For example, if you are using WordPress then you can do this work easily with Rank Math or Yoast SEO plugin. Also, there are a lot of redirects plugin for redirects.
A common way of implementing redirects is through a .htaccess file, which runs on Apache servers. Below we’ve listed some common .htaccess directives for redirection.
Replace the example domain with your new redirect destination.
Redirect 301 / https://www.website.com/
Use this redirect across different domains, or on your site.
Redirect 301 /old/ http://www.website.com/new/
Use Apache mod_rewrite in your .htaccess file for more flexible redirection. You can use it for http:// to https://
RewriteEngine on
RewriteBase /
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
You can apply redirect on PHP too. Check the below example:
<?php
header("Location: https://www.example.com/", true, 301);
exit();
?>
If your website running on an Nginx web server then in the “nginx.conf” file you can add a server block to handle these redirect requests:
server {
listen 80;
server_name old-website.com;
return 301 $scheme://new-website.com$request_uri;
}
If your website running on a Lighttpd web server you make a redirect by first importing the mod_redirect module and using url.redirect:
server.modules = (
"mod_redirect"
)
$HTTP["host"] =~ "^(www\.)?old-website.com$" {
url.redirect = (
"^/(.*)$" => "http://www.new-website.com/$1",
)
}
Hope you are getting all answers about what is redirect and how to use it. Share your thoughts in the comment section below.
Hi, I am Sandipan Pramanick from Kolkata, India
I am very glad that you are here and checked out my website. I am a professional Graphics, Web Designer and Passionate about SEO, Digital Marketing.
I am in this field around 5+ years. Currently, I am working in a private company as a SEO & Digital Marketing Executive, Asst. Graphics – Web Designer.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie | Duration | Description |
---|---|---|
__cfduid | 1 month | The cookie is used by cdn services like CloudFare to identify individual clients behind a shared IP address and apply security settings on a per-client basis. It does not correspond to any user ID in the web application and does not store any personally identifiable information. |
ARRAffinity | This cookie is set by websites that run on Windows Azure cloud platform. The cookie is used to affinitize a client to an instance of an Azure Web App. | |
AWSALBCORS | 7 days | This cookie is used for load balancing services provded by Amazon inorder to optimize the user experience. Amazon has updated the ALB and CLB so that customers can continue to use the CORS request with stickness. |
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-advertisement | 1 year | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Cookie | Duration | Description |
---|---|---|
YSC | session | This cookies is set by Youtube and is used to track the views of embedded videos. |
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors. |
_gid | 1 day | This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visted in an anonymous form. |
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie | Duration | Description |
---|---|---|
_fbp | 3 months | This cookie is set by Facebook to deliver advertisement when they are on Facebook or a digital platform powered by Facebook advertising after visiting this website. |
ANONCHK | 10 minutes | This cookie is used for storing the session ID for a user. This cookie ensures that clicks from advertisement on the Bing search engine are verified and it is used for reporting purposes and for personalization. |
fr | 3 months | The cookie is set by Facebook to show relevant advertisments to the users and measure and improve the advertisements. The cookie also tracks the behavior of the user across the web on sites that have Facebook pixel or Facebook social plugin. |
IDE | 1 year 24 days | Used by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile. |
MUID | 1 year 24 days | Used by Microsoft as a unique identifier. The cookie is set by embedded Microsoft scripts. The purpose of this cookie is to synchronize the ID across many different Microsoft domains to enable user tracking. |
test_cookie | 15 minutes | This cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies. |
VISITOR_INFO1_LIVE | 5 months 27 days | This cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website. |
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Cookie | Duration | Description |
---|---|---|
_clck | 1 year | No description |
_gat_gtag_UA_172320106_1 | 1 minute | No description |
AUID | 1 year | No description |
AWSALB | 7 days | AWSALB is a cookie generated by the Application load balancer in the Amazon Web Services. It works slightly different from AWSELB. |
CLID | 1 year | No description |
CONSENT | 16 years 9 months | No description |
conv_person | 2 years | No description |
conv_session | 2 years | No description |
session | session | No description |
SM | session | No description |
SRM_B | 1 year 24 days | No description |
TRINITY_USER_DATA | 1 year | No description |
TRINITY_USER_ID | 1 year | No description |