25
votes
Setting X-Forwarded-Proto under Apache 2.4
It's correct to set this directive like
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
If it doesn't work, you may need to install and ...
24
votes
Difference between the Accept and Content-Type HTTP headers
Accept is like
Here is my request and I would like (to Accept) this response format
Content-Type is like
Here is my request (or response) and this (Content-Type) is the format of the content ...
10
votes
Accepted
How is HTTP 418 treated by Google and others as it is not a "real" error?
If you use the "Fetch as Google" tool in Google Search Console on a page that returns a "418 I'm a Teapot" status then it simply reports an "Error" and indexing cannot be ...
8
votes
Difference between the Accept and Content-Type HTTP headers
It is a request-response conversation, so the client
sends a request of "Content-Type" and
expects to receive the response of "Accept" media type.
8
votes
Accepted
Why does it cause issues to use robots.txt and a meta robots tag at the same time?
The robots.txt standard controls whether the bot can view foo.html under any circumstances. Just because the bot sees a link to it from a different site doesn't give the bot permission to sneak a peek ...
7
votes
Headers to prevent 304/If-modified-since/HEAD requests
What you want is the immutable keyword in your Cache-Control line.
Example for php:
header('Cache-Control: public, max-age=80000, immutable');
Source:
https://code.facebook.com/posts/557147474482256/...
6
votes
X-Robots-Tag: noindex on an HTTP 302 response to remove subdomain
As of December 2022, Google will respect a X-Robots-Tag HTTP Response header that comes as part of a HTTP 302 response - Google Search Console will report: "Indexing allowed? No: 'noindex' ...
6
votes
Accepted
Will it hurt SEO to remove the '.html' extension from static pages such that they get served as 'text/x-generic'?
This isn't so much an SEO issue, as an issue as to whether your site would work at all. If it doesn't work in the browser then it's certainly going to hurt your SEO.
Your HTML pages still need to ...
5
votes
If i use 301 redirects (to bounce the requests), will the other destination be aware of my Server IP?
Well aren't you friendly...
"Hey Google, I'm having a DOS, but im making it your problem, thanks"
First: There is no difference for you between serving an 301 or an 404 error page. Your ...
5
votes
Accepted
What headers used in request by google bot?
if ($_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') {
Also bear in mind that the Cache-Control HTTP request header (as with most request headers) are entirely optional, so may not be present as part of ...
5
votes
Accepted
What is difference between robots.txt, sitemap, robots meta tag, robots header tag?
While X-Robots-Tag and meta robots are equivalent, robots.txt is different. The former is about indexing, while the latter is about crawling/visiting.
Tell bots not to visit a URL by using robots.txt....
5
votes
Cannot add "Host" header in Cloudfront
Official docs says
You can’t configure CloudFront to add any of the following headers to
requests that it sends to your origin:
Cache-Control
Connection
Content-Length
Cookie
Host
If-Match
If-...
4
votes
What is recommended minimum object size for gzip performance benefits?
Apache Tomcat has gzip filter and it starts to zip from 2kb, my quick test tells that it's the lowest boundary, and you can increase it at least to 3-4kb. Because for 2kb you will get a similar size ...
4
votes
Accepted
Looking for explanation of Apache behavior on manipulating headers
how this workaround indeed works
PHP runs later in the request, so most of the time you can simply override any headers that Apache has already set in your PHP code. That's pretty much it.
(Aside: ...
4
votes
Accepted
CSP3 Report-To header implementation
There are examples in the draft of the Reporting-Endpoints directive:
Reporting-Endpoints = endpoint-1="https://example.com/reports"
Your rule is correctly created, as in it returns a valid ...
3
votes
Setting X-Forwarded-Proto under Apache 2.4
Those response headers you are seeing look fine. You should not expect to the X-Forwarded-Proto header in them.
As you state, that header is set when the request is proxied to the back end. To ...
3
votes
X-Robots-Tag: noindex on an HTTP 302 response to remove subdomain
Google considers the status code before looking at everything else, so the X-Robots-Tag will be ignored. We did some test a year ago with a client and this was not working.
The strategy that we used ...
3
votes
Is no cache meta tag bad for performance?
Using a no-cache meta tag is a bad idea. Page caching is valuable for both SEO and user experience. Caching will improve (lower) page load times. This means a user sees the content faster, which ...
3
votes
Website <head> section questions
The order of meta tags does not make a difference.
You can use both ' and " in html5.
The conditional comments can be useful if you want to create specific CSS for Internet Explorer 8. However in ...
3
votes
Why does Pingdom suggest that I add a "Vary: Accept-Encoding" header?
What is it?
The Vary HTTP response header tells user agents (clients) that the server's response can vary if the client changes any of the mentioned request headers.
Vary: Accept-Encoding
This means ...
3
votes
Do browsers send different HTTP headers on page reload so that server side caches can be flushed?
No. The browser will send the same information on a refresh as if the user had just come to that page, with the same referrer information. Hence the problem of double-POSTing if someone refreshes the ...
3
votes
Accepted
Do browsers send different HTTP headers on page reload so that server side caches can be flushed?
Browsers do send additional headers, but behavior different. This info in link a bit outdated: stackoverflow question
Looks like Cache-control:no-cache is the best solution, to check for Ctrl+F5, but ...
3
votes
Double redirect - referrer in headers
Is it possible to check on the end (3) that user visit came from (1) my shortened link?
No, because "(1) my shortened link" is not the referrer. The web page that contains "(1) my ...
3
votes
Accepted
Should I always use 410 instead of 404?
Search engines (including Google) index neither "404 Not Found" URLs nor "410 Gone" URLs. From an indexing perspective using 410 as the default instead of 404 isn't going to be any ...
2
votes
Is no cache meta tag bad for performance?
The use of 'to cache or no-cache depends on the end performance sort:
1) Affiliate Marketers - need to 'cache tags' when pages etc go to landing pages as the cookies are needed for allocation of ...
2
votes
How to get keywords from Google HTTP referrer?
This website decodes the url for you but there's not too much information in there. https://gqs-decoder.appspot.com/
scheme : http
netloc : www.google.sk
path : /url
params :
query :
usg : ...
2
votes
Accepted
Googlebots request types
I'm pretty sure Googlebot does not send HEAD requests - at least not with respect to crawling and indexing a website.
My access logs from January and February 2016 show no HEAD requests from the ...
2
votes
Accepted
Is it feasible to use Vary: headers with If-none-match: to improve caching?
Based on your question and your clarification comment you would be better served using the URL rather than a header in order to best deal with downstream caching servers. In other words the first time ...
2
votes
Accepted
When should I not to use page meta security headers
I think you are asking about a conflict between HTTP headers versus page meta elements, correct? If yes, you should use HTTP headers and remove the page meta elements (at least the ones for security) ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
http-headers × 171http × 33
seo × 27
cache × 19
cache-control × 13
redirects × 12
web-crawlers × 10
apache × 9
headers × 9
php × 8
googlebot × 8
404 × 8
apache2 × 8
meta-tags × 8
google × 7
htaccess × 7
301-redirect × 7
security × 7
page-speed × 7
browsers × 7
html × 6
javascript × 6
nginx × 6
referrer × 6
expires × 6