Redirecting to an old external site

Hello folks,

I’m stumped by this issue, A set of pages under ‘portfolio’ get redirected to an external site (my old site).

But on my local machine it directs as it should.

My site is here

And my Github is located here

Everything works as it should except those pages under portfolio

What am I doing wrong?

@TeldridgeLDN Are you perhaps seeing some local caching artifacts? Your portfolio link goes to your portfolio page for me:

But when I click on a link within the portfolio page I get redirected to my old website e.g. /portfolio/kickstart becomes www/

You’ve not updated the link in your config.toml: baseURL = "" and you’re using .Permalink instead of .RelPermalink. The combination of that is giving that error. Changing either one would do the trick, however I recommend changing both.

1 Like

That’s super helpful.

I’m planning on moving the domain over to netlify which is why I left it in the baseURL as it is in the config.

Should I modify it for the time-being to and then amend it back to when I transfer the domain over?

You don’t need to update the config. You can change your build command to hugo --minify --baseURL https://www.domain.tld/ and it’ll use that URL irrespective of the value set in config.

And just so I’m 100% clear, where would I be making the change


The build command in your Netlify UI or netlify.toml, whichever you’re using.

Hey @hrishikesh

I’m using Netlify UI but where would I put that command in?

Many thanks


As I said before, in your build command.

1 Like

Thank you. It now works

1 Like