Where and how to set Vary: User-Agent HTTP header

According to Search Land and many other sources, if you are developing Dynamic Maintenance mobile content for your site, you must set the Vary: User-Agent HTTP header.

Is this done in a .htaccess file or somewhere else? This would be my first step, and I would really appreciate help and even an example. After searching, I narrowed it down to meta tags or htaccess, however, I could be wrong.

Your help is greatly appreciated. Thanks you

+4
source share
2 answers

. , , URL- , ( ), , , , User-Agent .

Google , .

, URL- . , -, , , , , , . , header PHP:

header('Vary: User-Agent');

htaccess, , . , , PHP.

+3

PHP , header, :

header('Vary: User-Agent');

, apache, mod_headers. :

Header: set Vary User-Agent

: , Vary .

+2

All Articles