How to change the copyright date automatically on a Weebly website


Update February 2024 - Thank you to my reader and Weebly designer Robin W. from the Netherlands who gifted me with the updated code that now works on Weebly.

Most websites you see have a copyright statement at the bottom of each page that describes who owns the content and gives the current year to show that the content is up-to-date. And there’s a way to add HTML code to have the copyright year change automatically, which is a nice convenience.

Your website content is automatically copyrighted, BUT…

Even if you do nothing with copyright dates on your website, the content is your intellectual property as long as you own it and you created it.

“Content on a website qualifies as intellectual property that can be copyrighted if the work is original, is owned by the applicant, and is clearly described. Your website is protected the minute it goes "live" on a server; you don't have to register the copyright for it to be effective.” (source: “How to Copyright a Website to Protect It”)

That’s right: your website content is protected automatically because you have created it. And you don’t have to register your copyright with the U.S. government if you’re based in the U.S. unless you plan to sue someone. But I still recommend adding a copyright statement in the footer area of your website as an extra reminder to visitors about the owner of the content.

Here’s how most people do it

The simplest way to add a copyright statement to your website is to add a text element in the footer area. The text should include the current year, the copyright symbol ©, and your business name. For example:

Copyright © 2024 by Kerry A. Thompson. All rights reserved.

While this approach is perfectly fine, there are two drawbacks:

  • At the start of each year, you must remember to update this statement with the current year. Who wants to be doing that on January 1 after a late New Year’s Eve??

  • All paragraph text in the footer is set through the Theme - Change Fonts settings. That means you can’t make this statement smaller than the regular text in the footer to make it less noticeable.

But how about letting the new year update itself?

There’s a small bit of code that you can add to your website that not only adds the words you want but also updates the copyright year AUTOMATICALLY. I have Kerstin Martin to thank for the original code she shared in this blog post for Squarespace websites and have adapted it for Weebly and put my own spin on it.

Add the Embed Code element to your footer

The Embed Code element

In the Build editor, click and drag the Embed Code element to the place where you want the copyright statement to go in the footer. I usually put it at the bottom below any important navigation links or contact information.

Add the custom HTML

Add the following HTML code in the Embed Code element. This includes a link to the Privacy Policy too, which I named privacy.html. If you don’t have a Privacy Policy, you can remove the <a href="/privacy.html" target=_blank><u>Privacy Policy</u></a> part of the code, but leave the </p> at the end.

Be sure the code doesn’t have any paragraph returns. It should read as if it were one continuous line of text.

<div class="paragraph" style="text-align: center”><font style="font-size: 80%; color: black">Copyright &copy; <span id="copy"></span> by BUSINESS NAME. All Rights Reserved. <a href="/privacy.html" target=_blank><u>Privacy Policy</u></a></font></div>

Then add the JavaScript code beneath it in five lines as shown to get the correct year to show up.

<script type="text/javascript">
var today = new Date();
var year = today.getFullYear();
document.getElementById('copy').innerHTML= year;
</script>

Save the footer and publish to see the result, similar to the image below.

Automatic copyright update

Result of sample code for automatic copyright update.

NOTE: If you get a blank page in the Weebly editor after finishing the code, close the editor and come back in again to edit the website and publish. As of January 2022, there seems to be a bug that causes the regular page elements to disappear and you see a page that only has the current year and nothing else. You have to close Weebly and go in again to see the page’s design.

Keep a copy of your code

Weebly Support can’t help you with any custom code issues and is quick to blame custom code as a possible cause when a problem arises with your website pages. It’s a good idea to keep a copy of your code in a text file in case they ask you to remove the code temporarily if you’re trying to get Support’s help with something that isn’t working.

Disclaimer

If this code doesn’t work for you, I’d recommend going with a simple text statement. While I know a little about HTML, chances are I won’t be able to help you troubleshoot code for your particular situation.

Happy New Year!

Next year, when you wake up on January 1 and look at your website’s copyright date, it will have magically changed itself to the new year. A self-managing website. Now that’s something worth celebrating!



Kerry A. Thompson

You don’t need a big agency to get your website done. You just need the one right person. I offer Squarespace website design and content development services for creatives, coaches, and healers. Learn more in a free 30-minute consultation.

Previous
Previous

How to find free photos you love for your Weebly website

Next
Next

How to make your own crop circles in Weebly