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
-
Exposure from backlinks for job posting URL. Will soon expire, how best to keep the backlink juice?
Hi All, First post and apologies if this seems obvious. I run a niche jobs board and recently one of our openings was shared online quite heavily after a press release. The exposure has been great but my problem is the URL generated for the job post will soon expire. I was wondering the best way to keep the "link juice" as I can't extend the post indefinitely as the job has been filled. Would a 301 redirect work best in this case? Thanks in advance for the info!
Technical SEO | | MartinAndrew0 -
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 -
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 -
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 -
Is the If-Modified-Since HTTP Header still relevant?
I'm relatively new to the technical side of SEO and have been trying to brush up my skills by going through Google's online Web-master Academy, which suggests that you need a If-Modified-Since HTTP Header tag on your site. I checked and apparently our web server doesn't support this. I've been told by a good colleague that the If-Modified-Since tag is no longer relevant as the spiders will frequently revisit a site as long as you regularly update and refresh the content (which we do). However our site doesn't seem to of been reindexed for a while as the cached version's are still showing the pages from over a month ago. So two question really - is the If-Modified-Since HTTP Header still relevant and should I make sure this is included? And is there anything else I should be doing to make sure the spiders crawl our pages? (apart from keeping them nice, fresh and useful)
Technical SEO | | annieplaskett0 -
Expired Domain - http:// or www
I have an old domain - When i use the link explorer i get way more juice out of the www version of my domain. I will be using wordpress to set up a new domain with the same name . My question is - How do I make it proper for seo? Do i just change the http:// to www in wordpress and be done with it? Does it even matter (thinking it does)
Technical SEO | | imagatto20 -
ECommerce: Best Practice for expired product pages
I'm optimizing a pet supplies site (http://www.qualipet.ch/) and have a question about the best practice for expired product pages. We have thousands of products and hundreds of our offers just exist for a few months. Currently, when a product is no longer available, the site just returns a 404. Now I'm wondering what a better solution could be: 1. When a product disappears, a 301 redirect is established to the category page it in (i.e. leash would redirect to dog accessories). 2. After a product disappers, a customized 404 page appears, listing similar products (but the server returns a 404) I prefer solution 1, but am afraid that having hundreds of new redirects each month might look strange. But then again, returning lots of 404s to search engines is also not the best option. Do you know the best practice for large ecommerce sites where they have hundreds or even thousands of products that appear/disappear on a frequent basis? What should be done with those obsolete URLs?
Technical SEO | | zeepartner1