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
-
An immediate and long-term plan for expired Events?
Hello all, I've spent the past day scouring guides and walkthroughs and advice and Q&As regarding this (including on here), and while I'm pretty confident in my approach to this query, I wanted to crowd source some advice in case I might be way off base. I'll start by saying that Technical SEO is arguably my weakest area, so please bear with me. Anyhoozles, onto the question (and advance apologies for being vague): PROBLEM I'm working on a website that, in part, works with providers of a service to open their own programs/centers. Most programs tend to run their own events, which leads to an influx of Event pages, almost all of which are indexed. At my last count, there were approximately 800 indexed Event pages. The problem? Almost all of these have expired, leading to a little bit of index bloat. THINGS TO CONSIDER A spot check revealed that traffic for each Event occurs for about a two-to-four week period then disappears completely once the Event expires. About half of these indexed Event pages redirect to a new page. So the indexed URL will be /events/name-of-event but will redirect to /state/city/events/name-of-event. QUESTIONS I'M ASKING How do we address all these old events that provide no real value to the user? What should a future process look like to prevent this from happening? MY SOLUTION Step 1: Add a noindex to each of the currently-expired Event pages. Since some of these pages have link equity (one event had 8 unique links pointing to it), I don't want to just 404 all of them, and redirecting them doesn't seem like a good idea since one of the goals is to reduce the number of indexed pages that provide no value to users. Step 2: Remove all of the expired Event pages from the Sitemap and resubmit. This is an ongoing process due to a variety of factors, so we'd wrap this up into a complete sitemap overhaul for the client. We would also be removing the Events from the website so there are not internal links pointing to them. Step 3: Write a rule (well, have their developers write a rule) that automatically adds noindex to each Event page once it's expired. Step 4: Wait for Google to re-crawl the site and hopefully remove the expired Events from its index. Thoughts? I feel like this is the simplest way to get things done quickly while preventing future expired events from being indexed. All of this is part of a bigger project involving the overhaul of the way Events are linked to on the website (since we wouldn't be 404ing them, I would simply suggest that they be removed entirely from all navigation), but ultimately, automating the process once we get this concern cleaned up is the direction I want to go. Thanks. Eager to hear all your thoughts.
Technical SEO | | Alces0 -
Are Expires Headers Detrimental to SEO Health?
My dev was looking into Expires Headers to increase speed, but she don't know the ramifications behind them for SEO. What I found online is really old: https://moz.com/blog/expires-headers-for-seo-why-you-should-think-twice-before-using-them What do SEOs think? Thanks in advance! ~Dana
Technical SEO | | dklarse0 -
Dealing with Expired & Reoccurring Content At Scale
Hello, I have a question concerning maintenance & pruning content with a large site that has a ton of pages that are either expired OR reoccurring. Firstly, there's ~ 12,000 pages on the site. They have large sections of the site that have individual landing pages for time-sensitive content, such as promotions and shows. They have TONS of shows every day, so the # of page to manage keeps exponentially increasing. Show URLs: I'm auditing the show URLs and looking at pages that have backlinks. With those, I am redirecting to the main show pages.
Technical SEO | | triveraseo
-However, there are significant # of show URLs that are from a few years ago (2012, 2013, 2014, 2015) that DON'T get traffic or have any backlinks (or ranking keywords). Can I delete these pages entirely from the site, or should I go through the process of 410-ing them (and then deleting? or ...?)Can you let 410's sit?)? They are in the XML sitemap right now, so they get crawled, but are essentially useless, and I want to cut off the dead weight, but I'm worried about deleting a large # of pages from the site at once. For show URLs that are still obsolete, but rank well in terms of kewyords and get some traffic...is there any recommended option? Should I bother adding them to a past shows archive section or not since they are bringing in a LITTLE traffic? Or ax them since it's such a small amount of traffic compared to what they get from the main pages. There are URLs that are orphaned and obsolete right now, but will reoccur. For instance, when an artist performs, they get their own landing page, they may acquire some backlinks and rank, but then that artist doesn't come back for a few months. The page just sits there, orphaned and in the XML sitemap. However, regardless of back-links/keywords, the page will come back eventually. Is there any recommended way to maintain this kind of situation? Again, there are a LOT of URLs in this same boat. Promotional URLs: I'm going about the same process for promotions and thankfully, the scale of hte issue is much less. However, same question as above...they have some promotional URLs, like NYE Special Menu landing pages or Lent-Specials, etc, for each of their restaurants. These pages are only valid for a short amount of time each year, and otherwise, are obsolete. I want to reuse the pages each year, though, but don't want them to just sit there in the XML sitemap. Is there ever an instance where I might want to 302 redirect them, and then remove the 302 for the short amount of time they are valid? I'm not AS concerned about the recycled promotional URLs. There are much fewer URLs in this category. However, as you can probably tell, this large site has this problem of reoccurring content throughout, and I'd like to get a plan in place to clean it up and then create rules to maintain. Promotional URLs that reoccur are smaller, so if they are orphaned, not the end of the world, but there are thousands of show URLs with this issue, so I really need to determine the best play here. Any help is MUCH appreciated!0 -
E-commerce: Taking care of expired product pages
Hi, I work for an e-commerce company in the fashion sector. As you probably know/can guess it is very popular for bloggers and other influencers to link to our products. But the problem is that our products often have a lifespan of only 2-3 months before they expire. Is the best solution to do a 301-redirect to the closest category page for expiring product pages? To make sure we don't lose these links to 404-pages. Or are there any other good solutions popular among e-commerce companys? Thanks for taking your time!
Technical SEO | | Mattiasj890 -
Rel="canonical" What if there is no header??
Hi Everyone! Thanks to moz.com, I just found out that we have a duplicate content issue: mywebsite.com and mywebsite.com/index.php have the same content. I would like to make mywebsite.com the main one because it already has a few links and a better page rank. I know how to do a 301 redirect (already have one for www.mywebsite.com) but I am aware that a 301 redirect for my index file would create a loop issue. I have read the article about redirecting without creating a loop (http://moz.com/blog/apache-redirect-an-index-file-to-your-domain-without-looping) but quite frankly I don't even have a clue what he's trying to tell me (e.g. "Create an apache DirectoryIndex directive for your document root." What????!)… So I figured a rel="canonical" tag for my index file would be easier and fix the problem, too (right??) In every "How to" description they always say you have to put the rel="canonical" tag in the header of your duplicate content file. But: My index.php has no header (or nothing that looks like a header to me)! This is what it looks like: foreach($_GET as $key => $value)
Technical SEO | | momof4
{
$$key = $value;
}
foreach($_POST as $key => $value)
{
$$key = $value;
}
$page_title="my title";
$page_description="my description";
$page_keywords="keywords";
//echo $link;
//exit;
if (!isset($link)):
$page_content="homepage.php";
else:
if ($link=="services"):
$page_content="services.php";
$page_title=" my title for services page";
$page_description="description for services.";
endif;
… ect. for the other pages So where do I put the rel=canonical tag? Or is there another solution for the whole problem? Like delete the whole index file (lol) Thanks in advance for any answers!0 -
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 -
Logo in header - picture or text
I was wondering for the logo from header: from SEO perspective, does it help if it is text formatted with css (if keywords from company title would metter) or just a logo picture with title? Would you guys recommend any? the website I'm talking about is http://azsedans.webperfection.biz/ thanks in advance
Technical SEO | | DavidIRC0 -
Site-Wide Header image w/ Link hurting me?
I have a banner in the header that is constant across all pages except the one it links to. It goes in before the content div and this search term is #1 across google in almost every variation, but it appears to link in a lot of the non relevant pages for #2 spots in some cases. While this is a relatively new domain (started 03/12), but this has been a constant rank for about 2 months. I'm wondering if this may be hurting the keyword targeting of my internal pages and if i should no follow that header image on all pages except the homepage?
Technical SEO | | choiceenergy0