I recently generated my website using hugo. When I preview it with the “hugo server” command at localhost:, everything works as expected. But when I upload it (after changing the baseurl), the urls for the tags stop working. I mean, I can’t access the url “https://domain.com/tags/tag”. I get a 404 error.
I’m assuming that the baseURL in the config file you linked to isn’t what you’re really using? If you don’t use the real domain (and subdirectory) then your site is unlikely to work after you upload it.
If the root of your site is a subdirectory, then you’ve got to be careful about how Hugo builds URLs in the HTML files. Have a good read of page in the docs about URL management, and search this forum for similar problems (it comes up fairly often).