301 Redirect Code Generator

Use our Redirect geneartor: The code 301 redirect generator supports web pages redirection of html, php, asp, aspx files and .htaccess redirect. ⇒ Try it yourself!

Enter URL of old page:

Enter URL of new page:

Select redirect type:

Generated redirect code to replace old page code:

Click on code to copy text to replace old URL page file with redirection code.

If you use this great tool then please comment and/or like this page.
Average Rating:     Tool Views: 4.7k

Is this tool helpful?
How can we improve it?

Subscribe for Latest Tools

How to use this 301 Redirect Code Generator Tool?

How to use Yttags's 301 Redirect Code Generator?

  • Step 1: Select the Tool
301 Redirect Code Generator Step 1
  • Step 2: Enter URL Of Old Page & Enter URL Of New Page & Select Redirect Type And Click On Generate Code button
301 Redirect Code Generator Step 2
  • Step 3: Check Your 301 Redirect Code Generator Result
301 Redirect Code Generator Step 3

301 Redirect Code Generator online to build Redirect Link URL code syntax which can be copied in HTML and other languages.

Redirect options

Redirect type Redirect side Old page
file type
Old URL server type Is permanent
301 redirect?
PHP Server-side .php Apache / Linux yes
ASP Server-side .asp IIS / Windows yes
ASP.NET Server-side .aspx IIS / Windows yes
Apache .htaccess Server-side all Apache / Linux yes
IIS web.config Server-side all IIS / Windows yes
HTML meta tag Client-side .html all no
Javascript Client-side .html all no
jQuery Client-side .html all no

If you want to link to Redirect Generator page, please use the codes provided below!

Redirect Generator

FAQs for 301 Redirect Code Generator

What is a 301 redirect?
A 301 redirect is a permanent redirect used to redirect one URL to another, indicating that the original URL has moved permanently to the new location.
What is a htaccess redirect?
A .htaccess redirect is a configuration file used on Apache web servers to set up redirects, rewrite URLs, and control server behavior.
How to choose a right generator for a permanent URL redirect?
To choose the right generator for a permanent URL redirect, consider the server type, ease of configuration, and the specific redirect types supported by the generator.
Why should I use redirections?
Redirections are used to ensure a seamless user experience, maintain SEO rankings, and update outdated URLs when moving or restructuring web content.
When should I apply a permanent redirect?
You should apply a permanent redirect (301 redirect) when a URL has permanently moved to a new location, ensuring search engines and users are directed to the new URL.
How Do .htaccess 301 Redirects Work?
.htaccess 301 redirects work by configuring the Apache web server to send a "301 Moved Permanently" HTTP status code, indicating that the requested URL has permanently moved to a new location, and the browser should update its bookmarked URL.
How to Create 301 Redirects with .htaccess?
To create 301 redirects with .htaccess, use the "Redirect 301" directive followed by the old URL and the new destination URL.