Redirect `/feed/` to `/rss.xml`

My feed is at /rss.xml

I want to redirect (ideally 302 redirect) from

  1. /feed/rss.xml
  2. /feed.xml/rss.xml

Adding the following to hugo.yaml does not work

params
  ...
    # For RSS feed
  permalinks:
    feed.xml: /rss.xml
  redirect:
    feed.xml: 301

What’s the correct way to do this?

This is a task for your web server. Apache, Nginx etc. have configuration to set upp redirects.

1 Like

Thanks.
I wrote nginx config for this.

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