Update Copyright Year Automatically (2021)

Thumbnail for Update Copyright Year Automatically

Do you have copyright lines in your website or blog? If you have copyright notice in the footer section, you may want to update copyright year automatically.

Updating copyright year is not time consuming and hard task, but you may still want it to happen automatically.

Why do I need to update copyright year?

Copyright notice and year represents that you have the rights on whatever content you have on the site till the date.

For the visitors this also shows that the site is up to date as it shows the updated copyright year.

Just imagine that you have a site made in 2007, and you are still actively updating the contents but you have copyright year of 2009 only.

In this case, if someone visits your site through search engines for specific topic after reaching to footer will doubt about freshness and may not explore more as expected.

Therefore, you may want to update copyright year automatically to assure that the contents on the site is updated and fresh.

Moreover, in some site builder and content management systems, you may find it harder to update copyright year by editing source code every year.

Similarly, if your site is a business website with very few activities, you may miss to update copyright year for few weeks to months.

Therefore, consider following my guide to update copyright © year automatically.

How to Update Copyright Year Automatically?

You can make your site’s footer to show current year in copyright statement by adding the following code snippets.

But before moving to the code snippets, you should find out where the source code for the copyright statement lies.

Normally, for Blogger, you can go to Theme>Customize>Edit HTML and search for the copyright term and replace with the code.

Edit source code in blogger to update copyright year automatically
Update Copyright Year Automatically (2021) 6

And for WordPress, footer copyright statement can be customised with footer.php file of the theme you are using.

Footer.php in WordPress
Update Copyright Year Automatically (2021) 7

You can edit footer.php from Appearance>Theme Editor.

For other platforms, you should consider finding it.

Using JavaScript To Update Copyright Year Automatically

JavaScript uses the date (year in our case) from user’s device. It will refresh the time from browser and show the current year in our copyright statement.

In most of the case, it works perfectly. But as it is affected by the browser date setting, visitors with wrong year setting will see different year.

Just replace your copyright statement with the following code snippets.

Copyright &copy;<script type="text/javascript"> document.write(new Date().getFullYear());
</script> <a href="/">"Your Site Name"</a>, All Rights Reserved.

This will give the following result.

Copyright © “Your Site Name”, All Rights Reserved.

As this snippet will get date from browser setting, the year may vary from person to person. But, in most cases it works as expected.

If the time set on all users device is correct then when you celebrate new year in the Line Island of The Republic of Kiribati (+14 UTC), you will see new year from there.

And at the same time someone from the Howland Island of United States (-12 UTC) will previous year for next 26 hours.

Because there is maximum 26 hours of difference in time in the world over theoretical 24 hours.

Using PHP Snippets to Update Copyright Year Automatically

If you use any php based CMS such as WordPress, joomla,etc. then you may use the following php snippets.

If you use WordPress, then find footer.php file and use the following php snippet to get current year.

<?php echo date("Y"); ?>

If you want to include the start date and current year, use the following snippet

Copyright &copy; <?php
  $fromYear = 2013; 
  $thisYear = (int)date('Y'); 
  echo $fromYear . (($fromYear != $thisYear) ? '-' . $thisYear : '');?> Site Name. All Rights Reserved.

If you use php snippets, it will use the year of server where it is located. And not affected by users browser settings.

Generally, no servers will have incorrect time setting. Therefore, it will also work as expected.

But if the server is located in -14 UTC, a visitor from +12 UTC will see previous year for the next 26 years.

And if the server is located in +12 UTC, a user from -14 UTC will get next year, 26 hours before the year actually starts.

Using WordPress Theme to Update Copyright Year Automatically

Some popular WordPress theme like Astra, GeneratePress, etc. by default provide a short code to update footer copyright year automatically.

image editor output image1198172701 16082576745195117874811268628362
Update Copyright Year Automatically (2021) 8

Just find the footer customisation area and check if it is available. The short code is also based on the similar php snippet.


In summary, what we need to understand is that the footer copyright statement of a site can be updated automatically by using some easy code snippets. And updated copyright date somehow helps as it seems to be a good and updated site.

Some Questions and Answers

Why to Update Copyright Year Automatically?

1. To show that the site is currently in operation and the information available in it is up to date.
2. To avoide yearly one time work that is minor to remember but has role in retaining the visitors
3. No need to change the year by reaching to complex source code.

Can I update copyright year automatically on Blogger?

Yes. The JavaScript snippet provided in this blog can be used to replace the Blogger’s copyright statement code.
To find where the copyright statement in Blogger’s template lies, find (Ctrl or CMD+F) some words used in copyright statement and replace the section with.

Copyright &copy;<script type="text/javascript"> document.write(new Date().getFullYear());</script> <a href="/">"Your Site Name"</a>, All Rights Reserved.

And you will get what you have expected. Do not forget to replace “Your Site Name” with your site’s name.

How do I update copyright year automatically in WordPress site?

In WordPress site, updating copyright year automatically is easy if the theme you are using provides short code for current year.

If you’re using GeneratePress, using %current_year% in copyright statement text field will result the current year.

If you are using Astra, using [current_year] in the copyright statement field or any shortcode field will result current year.

If you are using a custom or any other template, you can edit the php file that contains copyright statement (footer.php).

The custom php code for this operation is

Copyright &copy; <?php $fromYear = 2013; $thisYear = (int)date('Y'); echo $fromYear . (($fromYear != $thisYear) ? '-' . $thisYear : '');?> Site Name. All Rights Reserved.

Can I use above snippet if I am using custom footer design using page builder like elementor?

It is possible to get the year updated automatically while using custom footer using page builder.
To do so, drag html block from page builder to suitable area and paste the JavaScript provided above.

Is copyright year important for seo?

The year has nothing to do with seo. In fact, this is a notice to reader about the contents copyright.

Indirectly there is a little bit impact of the site’s copyright year as it shows the active status on site even if you are not really updating the contents.

If your site contains rare and time sensitive content, reader might try checking your update status and confirm whether it might be outdated or not.
In such cases, even the content is fresh but the year is showing 2010, visitor might leave immediately which sends bad ranking signal to search engines.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top