Use CMS to manage links to automatically redirect to another website

I’d like to create a CMS collection that manages other external links to other (affiliate) websites.

With my website, www.example.com, I have links in each blog CMS item (www.example.com/blog/blog-post) to other websites (newwebsite1.com/?ref=example)

I’d like to store all of the affiliate links in the CMS, so that they can be easily referenced, e.g. instead of typing out newwebsite.com/?ref=example each time, I can just reference a CMS page on my site, e.g. www.example.com/links/newwebsite1, which will then redirect to the URL referenced in the CMS item.

I saw this answer from @Siton_Systems , which suggested I could achieve this with some custom code on the CMS page, and I’ve managed to get it to work with adding this before the

<script>
window.location.href = "{{CMS New Redirect URL}}";
</script></body></html>

My question is, is there any downside to achieving it like this?

Where you want to put this code?.. In all pages? In some pages? (“redirect” == No way to visit the “current - your webflow page” == SEO problem).

If you know the affiliate sites (List below the article) - it is easier to use multi-reference-field.

Maybe add a screenshot.