23

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 I am sending in my request (or response)


18

Change your htaccess file code on your website root directory (i.e. Your public_html ".htaccess" file) <FilesMatch "\.(ttf|otf|eot|woff|woff2)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "http://skin.cdn.com" </IfModule> </FilesMatch> Now your CDN will be allowed to load your resource calling ...


16

It might come from 60 * 60 * 24 * 7 * 4 * 12 = 29030400 where each month consists of exactly 4 weeks.


16

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 enable the module mod_headers.


12

Unfortunately, you can't. Google search now exclusively uses HTTPS and all search result clicks go through an intermediate URL that removes the keywords. The URL you posted above appears to be that intermediate URL, and that's all you get as the referrer. The reasoning behind this is that each user of Google often gets personalised results based on their ...


10

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 requested for this page. In the screenshot below, the circled "Error"s are the result of requesting a page that returns a 418 status. No further ...


8

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

I have decided to serve only gzipped version of my pages If you're only serving files that you've compressed using gzip, then using Vary: Accept-Encoding will be of no benefit since there won't be uncompressed copies of the files to serve to clients that don't send Accept-Encoding: gzip in the HTTP request. Most clients these days do send this, so you ...


7

Yes. By the HTTP protocol, clause 7.2.1: “Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI ...


7

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 at it! Suppose I have a URL /foo.html for which crawling is blocked using robots.txt. Then the bot will not crawl the page, but it might still be indexed if ...


6

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/this-browser-tweak-saved-60-of-requests-to-facebook/


6

Some search engines and bots send HEAD request to pages before sending the GET request for reasons like: Checking if the page size has changed Checking the last modified date etc. (Any other info the head would give them!) This would help large crawlers save a lot of bandwidth if they know a page has not been changed meanwhile and they don't have to crawl ...


6

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 return the text/html mime-type in order to be interpreted as HTML by the browser. ie. You need to send a Content-Type: text/html HTTP response header somehow. ...


5

The reason is that your directive in the X-Robots-Tag is for indexation, not crawling. [EDIT] Explicit reference to this point is made here: https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag This document details how Google handles the page-level indexing settings allow you to control how Google makes content available ...


5

From my understanding and experience it seems to me perhaps you've misunderstood how CDN caching works: From the example you've given, the CDN would not ask your web-server when the file was last modified because you've already told it that the file has expired and will therefore need to be re-fetched anyway. Web browsers will only send an If-Modified-Since ...


5

Google considers redirecting content that is no longer available to be "soft 404". They would like to be able to treat the page the same as a 404 page. If you redirect the expired page to your home page, Google will identify it as a soft 404. It will appear in Google Webmaster Tools as an error. Google won't pass the link juice from inbound links to ...


5

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 server will have to do the same amount of work. The difference here is that you, with your 301->google solution, now ALSO make it Google's problem, effectively ...


5

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. Use only one of the three for each URL. Using both X-Robots-Tag and meta robots on a URL is redundant because they are equivalent, and using both robots.txt ...


5

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-Modified-Since If-None-Match If-Range If-Unmodified-Since Max-Forwards Pragma Proxy-Authorization Proxy-Connection Range Request-Range TE Trailer ...


4

http://www.example.com/ and http://www.example.com are the same URL. Whether or not the trailing slash is shown in the browser address bar is purely cosmetic - when the request is sent to the server the slash will be included. (http://www.example.com/foo and http://www.example.com/foo/ on the other hand are different URLs.) If the site you're working on is ...


4

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: Sending 403s through your 404 handler in this way obviously makes it harder to trigger a real 403 from your Apache config/.htaccess, if you should need to.) ...


3

It is a common mistake that people worry about 404 errors found in Google Webmasters Tool for pages that do not exist. This is a natural functioning of a website and search engine and therefore nothing to fix. If the page is gone, then a 404 error is appropriate. What frustrates people in these cases is that they feel that Google is still trying to access ...


3

I had the same issue, and the Requests are definitely hitting the server for it to respond with the 304 status - I'm sending the 304 via some C# and for sure it hits the server.. I only had Cache-Control: private set. No max-age and no Expires It operated as expected; hit the server with the If-Modified-Since where I test the value compared to what I ...


3

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 at the output + time penalty for zipping.


3

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 reduces abandonment rates - especially on mobile devices. Ideally users will use settings to clear their browser cache, however this cannot be assumed. A preferred ...


3

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 was to remove manually the URLs in the Search Console and add the folder to the robots.txt. An alternative is to use javascript redirects, but this is not very ...


3

See How to force files to open in browser instead of download (pdf)? which has an answer from ColinM that tells you exactly what the headers should be: To indicate to the browser that the file should be viewed in the browser: Content-Type: application/pdf Content-Disposition: inline; filename="filename.pdf" To have the file downloaded rather than ...


3

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 JSON object, but since the Reporting API is still a draft, most UA haven't got around implementing it. You could simply have both, report-uri and Reporting-...


3

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 many sites the number of IE8 users is small, so it's up to you to decide if it's worthwhile (and needed) to do it.


3

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 that if the browser sends a different value in the Accept-Encoding request header, the server might send a different response. (It should be noted that the ...


Only top voted, non community-wiki answers of a minimum length are eligible