Website url broken after changing site's randomly generated netlify name

I made a netlify hugo website a while ago. -

When I made it, I didn’t know I can change the randomly generated name, so it was for awhile.

I changed the name recently and came to know that after the main home page, users cannot find any of the pages on the site, as clicking on any link directs them to the page but with the older site name’s url.

For example, my home page works with gartage-blog, but clicking on any link would redirect the user to

This pages work if I manually change the links on browser url box to 01 Blurred Lines: Artist or Techie | Gartage. (replace stirring-quokka with the new name)

I have tried to fix this by clearing the cache and redploying the site via the netlify dashboard but no luck.

UPDATE: It turns out that I had still set the base url in my hugo site’s config.yaml as stirring-quokka which prevented the site from building the correct url. It has been fixed and the site is working again.