X
X
X
X

What is a 301 Redirect? Why and How?

HomepageArticlesGoogle SEOWhat is a 301 Redirect? Why and How...

About your website; Domain name change, moving a page to a new location, a broken URL, a page you want to delete, a product whose name has changed, or a desire to better classify your site's pages according to topics, what is a 301 redirect? and how to do 301 redirect? Our explanations about the questions can make your job easier.

What is a 301 Redirect? Why is it done?
A 301 redirect is a permanent redirect notification that takes users and search engines to a new URL on a website when the original page is no longer available.

If you do not follow 301 redirects when content is moved, both visitors and search engines will have a hard time understanding where the content is moved. Visitors will reach a 404 page and search engines will not be able to attribute any relevance or authority to the new URL. This will cause your rankings to drop significantly.

"301 redirects allow search engines to pass everything they associate with the content in the old URL to the new URL. This means that all social shares, backlinks and references that helped your old URL rank better will be transferred to the new URL ranking. That's why 301 redirects are very important for SEO. "

You must have encountered status codes such as 404 - Not Found, 403 - Forbidden, and 500 - Server Error on the web pages. When you change the URL of a piece of content on your site, anyone trying to visit it will receive a 404 page not found message.

In fact, 301 is a status code that a server sends to a browser like Google Chrome. With a 301 redirect, from the server where your website is stored; You want the old URL to redirect the visits to a new location, ie the new page of your content. This redirect happens so quickly that you often find yourself in the piece of content you are looking for without even realizing it.

You should not redirect to a page that has a different intention than the original, as it could have a negative impact on your site's user experience. You can only redirect to similar pages.

What Happens to a 301 Redirected Page?
Although a redirected page still exists in the content management system, it can no longer be used by visitors and search engines. Search engines merge the old URL with the new URL and stop showing the old URL in search results. It can take from a few days to several months for search engines to stop showing the old URL.

301 Redirect Via Htaccsess
If you want to make 301 redirects through the server, you should be aware that this may vary depending on the software (Apache, Nginx, IIS) your server is using.

If you do not know how to implement a 301 redirect via the server, it is recommended that you seek help from someone who is expert in this issue as it can lead to a downtime for your website.

To apply 301 redirects to websites hosted on servers running Apache, you must have access to the server's .htaccess file.

After accessing the Apache configuration file and entering the root folder, you can edit the code using a UNIX style text editor. For a successful implementation, you need to open your FTP and log in to your server or hosting admin panel.

On the Apache web server, routing rules are stored in the .htaccess file. If you can't see the htaccess file in your root folders, remember that the htaccess file is usually a hidden file, and make sure your browser is enabled so that hidden files can be seen.

Example for a 301 redirect in Apache:

If you are going to redirect a page;


RewriteEngine On
RedirectMatch 301 / old-page / / new-page /

If You Will Redirect the Whole Site;


RewriteEngine On
Redirect 301 / https://yenisiteniz.com

Redirects in nginx are stored in your nginx.conf file. Example for 301 redirects in Nginx:

server {
rewrite ^ / old-page / $ / new-page / permanent;
Your server reads your 301 redirect code instruction line by line, so the solution is to put a blank line at the end of your code to indicate the closing of your instruction.

If you are using cPanel hosting instead of making redirects manually in this way, you can also choose to automatically give a redirect instruction from cPanel to your .htaccess file.

How to Make a WordPress 301 Redirect?
For websites built with WordPress, you can see that it takes simple steps to redirect a URL using a free WordPress plugin. The most popular redirect plugin is Redirection, which has over a million downloads.

The most SEO friendly way to change the URL of a website; They are 301 redirects; The rate of protecting the search engine ranking of your old URLs of 301 reaches 90%.

Differences between a 301 redirect and a 302 redirect
301 permanent redirect


Top