Email "View Online" link returns 404

Hie

I am running a self hosted version of ghost and I just sent out my first email newsletter. The email were delivered fine but the View Online link on the email returns a 404 when clicked on. HELP

Even when I find the post in the admin tab & click View Online, it returns a 404.

Here is the link below:

Additionally, when I was testing out the newsletter before sending it out, the View Online option used to work. The link generated for the draft still works but however it’s not the one being sent out when I send the newsletter.

Here is the draft link: 🤖 Digital Bytes Newsletter

Is this a bug or is there something I have misconfigured ? Please help

1 Like

I’m getting the same error and would love to know the fix.

1 Like

Same here.
See below.
I am using Ghost Pro.


Sends me here https://www.cryptofireside.com/email/cb2335df-a5bf-4cb7-a751/
Which returns a 404.

I am not a dev but to me the issue seems simple enough. When ‘emailing only’ the ‘view online’ link should not be embedded into the email post because there is nothing to view online.

Can we get a response to this please as this is going to create a lot of 404 issues for us.

Thanks

1 Like

Wondering if there is a solution to this?

Have anyone in this thread been able to fix this error? It’s been a year since the last comment. I’m seeing a similar issue – with Email only posts – on a Ghost installation.

I just tested this out, but I can’t reproduce it. I was able to publish an email-only post and use the “View in browser” option.

We’ll need more info to help troubleshoot.

  • What’s your URL?
  • What version of Ghost are you using?
  • What configuration?
  • What browser?
  • What errors or information do you see in the console?
  • What steps could someone else take to reproduce the issue you’re having?

Thanks! :blush:

@RyanF After I posted my comment here, I started to check other possibilities and figured we’re not running the latest Ghost version. We’re on 5.52.3 right now. Before I give the details you asked, I’m going to update the software and check if that fixes the issue. I keep you posted. Thanks!

@RyanF So, upgrading to the latest version (5.59.2) didn’t fix the issue.

Here are the details you asked:

  • What’s your URL? Reventure Consulting
  • What version of Ghost are you using? 5.59.2
  • What configuration? I’m not sure what you mean by configuration
  • What browser? Google Chrome 114.0.5735.198 (arm64) (MacOS)
  • What errors or information do you see in the console? No errors in the console
  • What steps could someone else take to reproduce the issue you’re having? Please, see below

I created a new Post. And, after clicking on Publish, selected the Email only option. Chose a small group of members and completed the process. Right after doing this, I get the email and it looks fine. However, when I click on “View online”, the URL looks like: https://blog.reventure.app/blog/r/1852176e?m=... and shows the 404 error page.

This other topic might be related, but I’m not sure: https://www.reventure.app/blog/r/d1adab2f?m=cf8bf8ae-efbf-48fe-b8e2-3c14864ab14c

I’m still not able to replicate this, but in looking at your site, it looks like you have Ghost installed on a subdirectory. Is that right? How is that configured?

Because you turned on click tracking in Mailgun UI, but Mailgun does not allow HTTPS tracking links by default. Especially if you enable Always HTTPS on Cloudflare or submit HSTS preload, it will return 404.

This issue can be solved in two ways:

  1. Disable click tracking on Mailgun UI and enable ghost’s lose link tracking (not recommended).

  2. Follow this from Mailgun to enable HTTPS Tracking Links by yourself or via a support ticket.

I solved it myself because my site is HSTS preload.

2 Likes

@cuongtran I tried to follow the steps you mentioned but found out HTTPS was already enabled for the tracking links. Even though that was not the right solution, I focused on debugging the redirects from Mailgun tracking to the blog page and discovered an issue with the default URL set up. I updated that and now the links on Email only posts are working.

3 Likes