Forum Moderators: phranque

Message Too Old, No Replies

Apache server website showing weird http header.

         

born2run

12:57 am on Aug 7, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So I have a drupal website on Apache server. The home page shows the following http header:

EXPIRESSun, 19 Nov 1978 05:00:00 GMT

I researched on google and found it's the founding date of Drupal .. how do I remove this setting so that it doesn't effect search engine rankings or confuse browsers? Thanks!

phranque

2:44 am on Aug 7, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I researched on google and found it's the founding date of Drupal

actually it's the date the founder of drupal was born.
it's kind of an "easter egg" and is simply a really old Expires: header date.

you probably want to send an Expires header (as well as other appropriate headers) for caching reasons.

https://tools.ietf.org/html/rfc7234#section-5.3
If a response includes a Cache-Control field with the max-age directive (Section 5.2.2.8), a recipient MUST ignore the Expires field.

whitespace

7:16 am on Aug 7, 2017 (gmt 0)

10+ Year Member Top Contributors Of The Month



...how do I remove this setting so that it doesn't effect search engine rankings or confuse browsers?


This "Expires" header won't "affect search engine rankings", nor will it "confuse browsers". As phranque suggests, this is related to client-side caching. A date in the past (any date) simply prevents the resource from being cached.

Whilst all user-agents will understand the Expires header, it is considered "old" and is only really required by "old" browsers. It has been superseded by the "Cache-Control header with a max-age directive" (that phranque mentions), which is why this will override the Expires header in all user-agents that support it.

born2run

5:34 pm on Aug 7, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ok great thanks whitespace and phranque!