Expires Header
-
We are considering adding expires header to our site. If we add this meta tag to expire for a certain date, but we do not make any changes to the site after it expires, can you be penalized for this?
-
No. The expires directive is merely there to tell the browser "this content is at least good until date X", so that the browser doesn't need to fetch it if it's got it cached.
So let's say you've got a dynamically-generated page called widgets.php, and it pulls a list of products, latest pricing, availability etc. from the database. Let's say you style the page with an external stylesheet.css, you've got some awesome wacky UI stuff in Javascript in an external wackystuff.js, and your images for navigation on the site are in /img/nav (but product images, which maybe can change more frequently) are in /img/products.
You might NOT set the Expires header on your .php files and folders, as those should be considered to expire the second after the browser fetches them. You might set the Expires header for the CSS file to a week out; same with the JS and the /img/nav folders, as those only change with a major update to the site. You might set the Expires header date for the /img/products folder to maybe an hour or two, so that if a person is flipping back and forth between pages, the browser will use the cached product image for a little while before forcing a refetch of it.
Make sense?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Optimal use of keywords in header tag
what does optimal use of keywords in header tag actually mean given you indicate this as hurting seo factor?
Technical SEO | | Serg1550 -
What about re-life expired domain ?
I want to know about your advice to re-life expired domain, assume PA:55 how I get benefits from it, when I use it for new related content.
Technical SEO | | zant0 -
Mobile header and Schema Tags
We have recently made a website I work on responsive. This involved taking their original desktop site and then making it work on mobiles/tablets. Due to the nature of their existing header we are serving a different version to mobiles/tablets. Do the schema tags which are on the desktop header need to be added to the mobile version or are they just needed on the desktop code?
Technical SEO | | edwardlewis0 -
Https redirect when certificate expired
Hi, How do we 301 an https version of a domain to a page on another website when the security certificate has run out? We have 301 redirected the http version but IT stuck on how to do the expired https. Thanks
Technical SEO | | Houses0 -
Header Tag Question
While reviewing code on a site, I found the following: <h1 class="<a class="attribute-value">logo</a>"> <a id="<a class="attribute-value">logo</a>" href="[http://siteexampleh1.com](view-source:http://dmbinc.com/)"><span>Example of most important content on this page- Companyspan>a> h1> Is this the correct way to place code for an h1 tag? The content is cached within the page and is hidden to the viewer. The content that is assigned as the h1, is a logo. Majority of code I have been reviewing does not use this setup. The code would instead read as ( This is heading 1 ). Can anyone provide insights on this? Thanks!
Technical SEO | | jfeitlinger0 -
Generating a signature and expires in java
Hello, I am developing a tool for my company to get stats from SeoMoz using your API. During development, I have been using the example signature and expires values which are auto-generated for me. Now that testing is complete, my code will need to generate these values. I have been googling looking for a resource demonstrating how to do this using Java, but I have not found a good example. I was hoping that someone at SeoMoz would have a resource or an example that they could share. The email associated with this account belongs to a non-developer, so if a response is provided via email in addition to the forum, sending it to my email would be much appreciated. Thank you, Anthony aruffino@ignitemedia.com
Technical SEO | | TRich500 -
Setting up a 301 redirect from expired webpages
Hi Guys, We have recently created a new website for one of our clients and replaced their old website on the same domain. One problem that we are having is that all of the old pages are indexed within Google (1000s) and are just getting sent to our custom 404 page. We are finding that there is an large bounce rate from this and also, I am worried from an SEO point of view that the site could lose rank positioning through the number of crawl errors that Google is getting. Want I want is to set up a 301 redirect from these pages to go to the 'our brands' page. The reason for this is that the majority of the old URLs linked to individual product pages, and one thing to note is that they are all .asp pages. Is there a way of setting up a rule in the htaccess file (or another way) to say that all webpages that end with the suffix of .asp will be 301 redirected to the our brands' page? (there is no .asp pages on the new site as it is all done in php). If so, I would love it if someone could post the code snippet. Thanks in advance guys and if you have any other ideas then be my guest to suggest 🙂 Matt.
Technical SEO | | MatthewBarby0 -
Snagged an Expired Domain Best way to get all the Link Juce?
Found a PR4 domain that had expired and not been renewed. Best way to get all the link juice from it? just 301 the whole thing to MY main domain?
Technical SEO | | bozzie3110