Set up 301 redirect

If a web­site moves per­ma­nent­ly and, for exam­ple, the domain changes, the new address can be noti­fied to the search engines and web browsers via a 301 redi­rect.

If a blog exists for a cer­tain time, there are many links on the web. If the url changes, all links become invalid. Vis­i­tors are direct­ed to the unloved 404 page as well as to the search engines. Thus the page sinks in the rank­ing of the search engines and in the rep­u­ta­tion of the vis­i­tors.

Now vis­i­tors will not only be redi­rect­ed to the new site, but at the same time the infor­ma­tion will be shared that this move is per­ma­nent. Of course every exist­ing link should be con­sid­ered.

Every old link should auto­mat­i­cal­ly refer to the new blog. For exam­ple, the link should refer from https://buecher.fl‑e.de/2019/02/21/thriller-ein­er-wird-ster­ben/ to https://buechernarr.org/2019/02/21/thriller-ein­er-wird-ster­ben/.

Plugins

There are plu­g­ins that are sup­posed to do this for you, but these redi­rect plu­g­ins all did not work reli­ably. Sin­gle redi­rects were no prob­lem, but who wants to define more than 250 redi­rects by hand? It’s quite pos­si­ble that the plu­g­ins were not set up cor­rect­ly, but we did­n’t find any instruc­tions on how to use wild­card plu­g­ins to take all links into account.

For this rea­son we have set up a 301 redi­rect direct­ly via .htac­cess.

Atten­tion: In order for the redi­rec­tions to work per­ma­nent­ly, you must remain the domain own­er of the old domain! If the domain is can­celled or released, all files on the serv­er will also be delet­ed – includ­ing the .htac­cess file. As a result, the redi­rects no longer work.

On the serv­er of buecher.fl‑e.de (the old serv­er) there must be a .htac­cess file with the fol­low­ing con­tent:

RewriteEngine On
RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(.*)$ https://buechernarr.org/\ [L,R=301]

https://buechernarr.org must of course be replaced by your own url.

Such a 301 redi­rec­tion can be set up not only for a domain move where the blog struc­ture has remained the same, but also for an SSL set­up or if the direc­to­ries on a serv­er have changed.

 


maps dis­play

Leave a Reply

Your email address will not be published. Required fields are marked *