How to Auto-Update the Copyright Year on Your Website

Avoid getting caught and called out by mostly well-meaning website visitors.

TL;DR version:

<p>Copyright &copy; <script>document.write(new Date().getFullYear())</script> Your Name All Rights Reserved</p>

The full story:

Your website footer may be one of the last thing’s a visitor sees as they click around on your domain. Yet it never fails that, if an error lives in your footer, someone will find it.

One error that occurs regularly on websites across the interwebz is that the copyright year doesn’t get updated. It may seem like a very little thing and, after all, “shouldn’t people be focused on the quality of my content rather than if I forgot to update to the current year?”

Sure. OK. But let’s say you’re trying to find the very latest update about something online, and Google serves up a load of results for you with articles that relate to your question. Are you going to go for an article that was published in the last few months or one that is dated six years ago?

The same applies to your website. A current year in your website’s footer information is a simple yet important way to emphasize that someone with a pulse still checks your website every so often.

“But Rachel,” you’re asking, “there must be a way in this day and age of website coding that the year can automatically update without me having to log in, find the footer, and change it manually?”

Why yes, dear friend, there is! And here’s how to do it:

  1. Login to your website and navigate to where to update your footer information.
  2. Switch to HTML or <> in the editor so you can drop code in (rather than text).
  3. Add the following code:

<p>Copyright &copy; <script>document.write(new Date().getFullYear())</script> Your Name All Rights Reserved</p>

You can alter anything in blue; that will change what the website visitor reads in the date line. Everything else will automatically update the current year in the copyright information for your site.

And, with that, you’ve just given yourself one less to-do item on your annual checklist. That deserves some celebration!

Published by Rachel

In the words spoken by Samuel Jackson in Ironman 2, “I’m the most real person you’ll ever know.” Although I have a flair for the dramatic, I’ve never been one to live behind a facade. From the moment you meet me, I can promise you an experience grounded in transparency and lively with humor. My 40+ years of life have taught me the ability to laugh and to help others enjoy the moment with me. I use my eye for detail and focus on the big picture to bring success to anything I try, and that includes the work I do for my clients.

%d bloggers like this: