<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Trank Technologies</title>
    <description>The latest articles on DEV Community by Trank Technologies (@tranktech).</description>
    <link>https://dev.to/tranktech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1126820%2F0fd06e10-ff52-4d6d-a3c2-5bb94f49dbdc.jpeg</url>
      <title>DEV Community: Trank Technologies</title>
      <link>https://dev.to/tranktech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tranktech"/>
    <language>en</language>
    <item>
      <title>What are the most common redirection methods for bingers ?</title>
      <dc:creator>Trank Technologies</dc:creator>
      <pubDate>Wed, 26 Jul 2023 06:48:58 +0000</pubDate>
      <link>https://dev.to/tranktech/what-are-the-most-common-redirection-methods-for-bingers--ci7</link>
      <guid>https://dev.to/tranktech/what-are-the-most-common-redirection-methods-for-bingers--ci7</guid>
      <description>&lt;p&gt;Here I know some methods, if you know other please share &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;301 Redirect (PHP Example):
A 301 redirect is a permanent redirect from one URL to another. It is used when you want to inform search engines that the original URL has permanently moved to a new location.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&amp;lt;?php&lt;br&gt;
// Permanent 301 redirect&lt;br&gt;
header("HTTP/1.1 301 Moved Permanently");&lt;br&gt;
header("Location: &lt;a href="https://www.newdomain.com/new-page%22"&gt;https://www.newdomain.com/new-page"&lt;/a&gt;);&lt;br&gt;
exit();&lt;br&gt;
?&amp;gt;&lt;/p&gt;

&lt;p&gt;2.302 Redirect (PHP Example):&lt;br&gt;
A 302 redirect is a temporary redirect from one URL to another. It tells search engines that the original URL is temporarily moved to a new location.&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br&gt;
// Temporary 302 redirect&lt;br&gt;
header("HTTP/1.1 302 Found");&lt;br&gt;
header("Location: &lt;a href="https://www.newdomain.com/temporary-page%22"&gt;https://www.newdomain.com/temporary-page"&lt;/a&gt;);&lt;br&gt;
exit();&lt;br&gt;
?&amp;gt;&lt;/p&gt;

&lt;p&gt;3.Canonicalization (HTML Example):&lt;br&gt;
Canonicalization helps address duplicate content issues by specifying the preferred URL version of a page. Use the following link tag within the &lt;/p&gt; section of your HTML code.


&lt;br&gt;
  &lt;br&gt;


&lt;p&gt;4.Meta Refresh (HTML Example):&lt;br&gt;
While not the best option for SEO, you can use the meta refresh tag to redirect users after a specific time delay. Add the following meta tag within the &lt;/p&gt; section of your HTML code


&lt;br&gt;
  &lt;br&gt;


&lt;ol&gt;
&lt;li&gt;JavaScript Redirect (JavaScript Example):
Using JavaScript for redirects can be done like this:&lt;/li&gt;
&lt;/ol&gt;


&lt;br&gt;
  &amp;lt;br&amp;gt;
    window.location.replace(&amp;amp;quot;&amp;lt;a href="https://www.example.com/new-page%22"&amp;gt;https://www.example.com/new-page&amp;amp;quot;&amp;lt;/a&amp;gt;);&amp;lt;br&amp;gt;
  &lt;br&gt;


&lt;p&gt;6.htaccess Redirect (Apache Server Example):&lt;br&gt;
To implement redirects using the .htaccess file, you can use the following code for 301 and 302 redirects:&lt;/p&gt;

&lt;h1&gt;
  
  
  301 Redirect
&lt;/h1&gt;

&lt;p&gt;Redirect 301 /old-page &lt;a href="https://www.example.com/new-page"&gt;https://www.example.com/new-page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  302 Redirect
&lt;/h1&gt;

&lt;p&gt;Redirect 302 /old-page &lt;a href="https://www.example.com/temporary-page"&gt;https://www.example.com/temporary-page&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>security</category>
    </item>
  </channel>
</rss>
