Yes. It is legal to update the copyright automatically. It is also legal to put the wrong year, whether it is 100 years ago, or 100 years in the future. (See 17 USC 406, which explains that an error in the date is only relevant for works published prior to March 1, 1989.) Today, you can put whatever you'd like there, as the copyright notice on a website has very little legal meaning. There are 2 main reasons for this:
- All content is automatically copyright protected whether you specify the copyright or not. (United States Copyright Office: Copyright Notices: "U.S. law no longer requires the use of a copyright notice")
- It's common knowledge that it is extremely easy to update a website and its content, so if you ever get into a legal battle where you need to prove which party created something first, the copyright date written on a website will not be considered valid evidence. Other mechanisms will need to be used, such as registered copyright or perhaps even code vaults with a trusted 3rd party.
However, by displaying a proper copyright notice, "the court will not give any weight to a defendant’s use of an innocent infringement defense". (Copyright notices)
That being said, what should you do? The most popular options are:
- Don't display a copyright notice at all.
- Display copyright without a year.
- Display the current year.
- Display a range from the first publish year to the current year.
- Display the year of last content publish.
Note that the last option (display the year of the last content publish) is what some copyright experts still recommend today. But IMHO that is an outdated practice and is pointless. If your site has 1000 webpages on it, and you add one more page this year and update the site-wide copyright year along with it, that obviously does not reset the true copyright year of the other 1000 pages.
Also, some people believe that a website with a copyright year older than the current year makes the site appear stale, which may hurt the site's reputation. If you feel that your website could fall into that category, then an auto-update or no year at all is probably the best way to go.