Having /tag/tag1 insted or alongside with /tags/tag1

Hello Everyone,
i’m relative new to hugo (making the second project). I’m trying to switch from my old blog engine to hugo.

Now hugo seem to define tags under /tags URL so which is fine. but my old engine hasn’t used plural
but /tag

To not confuse google too much I would like to have old URLs be resolvable. Is there any possibility to
to change /tags to /tag (/tags/hugo be /tag/hugo) or at least making it an alias or best case making
/tag/whatever redirect to /tags/whatever ?

Just in case: I’m using PaperMode theme

Hi and welcome!

You can use this in your config file:

  tags: /tag/:slug/

This is good! thx!
would it be possible to redirect /tag/:slug/ to /tags/:slug/ somehow?

/tags/:slug/ is the default, so to speak – the path you want to avoid if I understood correctly – e.g. /tags/tag1.

Hi, yes you understood it correctly. the minimum i’ve asked for is working.
However, the best solution would be

tags are under defaul /tags ed. /tags/tag1
but when someone hits /tag he is redirected (HTTP 301) to /tags and on /tag/tag1 – to → /tags/tag1.
but probably this is not possible with hugo?


If you host your site on netlify or a similar service you can use redirects.

If you use a shared hosting service or your own server you can probably use .htaccess redirects.

This is untested, but something similar should work:

RewriteRule ^tag/(.*)$ /tags/$1 [L,NC,R=301]

Thx. Indeed it’s what i’m trying now. Not a hugo issue anymore

supplementary link: permalinks-configuration-example