URL redirection; for general use, which is better: server or client side?

Take a very simple example, for example, I have this URL:

http://www.example.com/65167.html

and I want to use this content in the section:

http://www.example.com/about

UPDATE . Note that the “bad” URL is canonical (it is created by CMS, which uses it internally to bind), so "/about"this is just a way to polish it.

I have two broad options: server-side redirection or client-side redirection. I always thought that the server side is preferable because it is more efficient, i.e. HTTP traffic is about double. However, SEO techniques tend to favor a single resource URL, so the client side should be preferred.

How do you resolve this conflict, and are there other factors that I have missed?

+3
source share
3 answers

Apache HTTPD mod_rewrite can leave a browser showing the URL optimized for SEO in its location bar when redirecting to the numeric URL of the server:

RewriteEngine on
RewriteRule ^/about$ /65167.html [L]
+4
source

A 301 is the wrong approach for this problem if you redirect from / about to / 65167.html. Your CMS will only understand 65167.html request, but 301 basically tells Google that / no longer exists and indexes page 65167.html.

. mod_rewrite, - CMS, , CMS - .

, , , .

+3

I am sure that Google understands 301 moved forever .

+2
source

Source: https://habr.com/ru/post/1699206/


All Articles