How to remove Date stamp from Google SERP description?

Some of you may have noticed that when your blog (or individual post) is listed on Google search results (SERPs), a date stamp gets prepended to the meta description of the indexed page (see the image below). There are are various theories regarding how and from where Google picks this date stamp. Some believe that it is the time stamp of the last post on your blog, where as a few others believe that it’s the date on which your site is last indexed. Regardless of the reason, sometimes this extra date field can be a bit annoying for some of you and in this post let me explain how you can remove the same.


Ways to remove date from search results

First of all, let me tell you that not every blogger or webmaster face this issue. And this doesn’t quite depend on your blog theme as well – i.e. Blogs using the same theme and layout may or may not have this issue. However, for those who have completely disabled post dates, this may not happen at all. And hence the fixing process starts based on that behavior because in most cases, Google seems to pick the date from the content of the page or your blog post.

Date in search result meta description

There are basically two ways of removing this date in the Google search result or meta description.

1. Use image based dates instead of the usual theme (PHP) generated server side time stamp. In this case, you have to convert the date string to images and hence it may not be very easy to create the image styles that exactly match your theme. Also, you may have to change it every time you change your styles.

2. Use client side logic (javascript) to render the dates so that when Google picks the page, it doesn’t quite read whatever (date) is there between the script tags. I prefer this method.

(Third option obviously is to remove the dates totally but you might want your post dates to be present there)

So how do we fix it? Just follow the simple steps as given below for a WordPress blog. For any other blog platform/website, you may similar logic.

- Open your theme’s index.php file.
- Search for the place where you display the time – usually a call to something like the_time(‘F j, Y’) method
- Replace that logic with Javascript. i.e. paste the following code instead of the time (Please type in the code as I have actually pasted an image of the code snippet here)

javascript to remove date from Google indexing

This makes sure that the server side date rendering is avoided and hence Google wouldn’t list it next time it index your blog’s home page.

If you want to do the same for individual posts, repeat the above step for your single.php file. Please note that existing posts may take some time before the date from their description field is removed. To enforce the changes, you may want to republish the post as well.

Update: Aug 15
Sometimes the above script still doesn’t work on single posts. In that case you may use a combination of javascript and PHP to render your date, as mentioned in the example below.

javascript and PHP to remove date from Google indexing
[Click image to enlarge]

Pros and cons of the date stamp on Meta description

If you are a regular blogger who makes one post (or more) a day, you may not really mind having a date prefixed on search results of your homepage. However, if you post once a week or so, like me, you may not want to show that your last update was a week back because it may affect your click-through rate from search. The same logic is applicable for individual posts as well. I mean, nobody will click a SERP link, if the post date/year shows something like 2008.

Also, the date prefix sometimes affects the readability of your page description (usually the marketing punchline) and at times truncates it as well.

Hope this tip was useful for your blog’s SEO!

Happy SEO!


Genesis

Price: 59.95

AgentPress Theme

Price: 99.95

Lifestyle Theme

Price: 79.95

Corporate Theme

Price: 79.95

Generate Theme

Price: 79.95

Magazine Theme

Price: 79.95

Comments

  1. Is removing date stamp from google can be any penalty? I mean suppose I posted a content and a next day another website posted same thing then how google can make distinguish from both in absence of date mark?

    please tell me side effect if this..

  2. Ivon :

    thanks for the post, really I had not realized how important it was far to me personally I like to publish once a week, but I think my view is important not to have that date as say they will not read things that are of 2008. : D

  3. how to remove in joomla

  4. Ryan :

    Thanks for this Ajith. For my purposes, this was a lifesaver on one of my new sites. Anyways, I’d just like to share something, in case it may help others.

    I was getting an error with your code:
    document.write(”);

    Upon closer inspection of the original line, it was quickly remedied with a minor change:
    document.write(”);

    *default usage is

    Also, some themes work with loop.php, this is where you may need to insert/edit the code. Other themes use different methods, but you sometimes simply use document.write(‘'); and might work. It worked with some themes, not with others. Be sure to backup the file before making changes.

  5. I have a lot of posts, and I am using a theme, Yalin. The date comes in on google serps which is definitely not good, my views are okay but I believe this may be a big factor. Basically, I am not sure how to implement the code. In my single.php the code is different, would I replace the entire div, or how can I go about this? If you dont mind taking a look my Site is renovatedceilings.com.

    Thanks for your help.

    • Ashley, without knowing how your single.php looks like, I won’t be able to comment. Essentially, you won’t be needed to remove/replace HTML elements such as div or span but only change the PHP part/function that renders date.

Trackbacks

  1. [...] hope this helps some­one else out there, and spe­cial thanks to Ajith for orig­i­nally post­ing this [...]

Speak Your Mind

*