Tags url not working

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 using the terminal theme.

I upload using “rsync -Cavz

My config file is here: https://pastebin.com/pgq2tahc

What could be the issue here? Thanks.

EDITED TO ADD: Also, I noticed that the pictures do not load when uploaded to the server, but they work when viewing localhost. I only get the alt text where the pic should be.

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).

Thanks for your reply, but I’m sorry, I am still confused. The baseURL in my config is correct, I just redacted it from the pastebin. And the site works except the tags and pics.

The site is in a subdirectory.

If I understand correctly, the url “https://domain.com/hugodir/tags/some-tag” should work, but it doesn’t for some reason.

I read the link and tried to set relativeURLs = true, but that didn’t work.

OK, now it works. For some reason, the entire /public wasn’t rsynced to the server. For example, /tags was missing. I have no ideawhy that happened, but I should have checked that in the first place.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.