Links in newsletter get hashed with `/r/{hash}`

Hi, I’m using Ghost as a completely headless CMS for I would also like to use the newsletter functionality to let my audience know when I post new content to my site.

The issue I have though is that Ghost changes links in newsletter URLs. For example, if I place a link in a newsletter to direct to, the link gets changed to something like in the screenshot below:

Clicking on this leads to a 404 on my site (since I don’t have route generated for this URL).

Is there a way I can resolve the URL back to what it’s supposed to be or just disable this hashing all together? Thanks!

I’m not sure if you can disable it, but for context, the redirect exists to allow you to fix broken links in the admin panel, and (if enabled) track clicks

1 Like

I get that, how would I go about resolving the URL if I’m using a custom frontend?

I’m not sure how well-suited Ghost is for using a custom frontend with memberships.

The simplest option would be to have a serverless function that calls back to your Ghost instance. I’m not sure if the content API exposes this data.