Resolved : Astro RSS Feed Rejected by Apple Podcasts Due to 403 Error

Hi Vercel Community,

I’m hosting an Astro project on Vercel, and I’m running into an issue with the RSS feed for a podcast being rejected by Apple Podcasts due to a 403 error.

Problem:

update: the rss feed is accepted by amazon music, deezer, spotify very well. Apparently only Apple requires the support of the HEAD method.

The RSS feed URL: <![CDATA[Dieu au quotidien]]>
When validated using tools like Cast Feed Validator, I get the following error:

This server does not support HTTP head requests. Head request support required for Apple Podcasts. Did not finish feed tests.

This also causes Apple Podcasts to reject the feed during submission.

Steps to Reproduce:

I created a simple reproduction to simulate the issue:

in src/pages/health-check.xml.ts

export const prerender = false;

export async function ALL() {
  return new Response(null, {
    status: 200,
    headers: {
      "Content-Type": "text/xml; charset=utf-8",
      "Cache-Control": "public, max-age=0, must-revalidate",
      "Access-Control-Allow-Methods": "HEAD",
      "Access-Control-Allow-Origin": "*", // CORS
    },
  });
}

Then check for /health-check.xml

you can swap ALL for other HTTP method. GET works, HEAD will give 403.

What I’ve Tried:

  • Confirmed that the RSS feed serves with 200 OK when accessed from browsers or with tools like curl with GET.
  • Ensured that Access-Control-Allow-Origin is set to "*".
  • Validated other headers like Cache-Control and Content-Type align with expected formats for podcast feeds.

Observations:

  • The issue seems specific to Apple Podcast’s user agents and perhaps others, but tools like Cast Feed Validator can consistently replicate the 403 error.
  • The prerender = false is used, as the feed is dynamic, and that could potentially have implications.
  • I don’t have any issue in dev mode localy

Help Needed:

  1. Has anyone encountered similar issues where specific user agents result in a 403 error on Vercel?
  2. Could there be an issue with Vercel’s edge network blocking certain types of requests, especially if they’re not browser-like?

Any insights, advice, or debugging tips would be immensely helpful!

Thanks in advance! :blush:

Apparently it’s impossible to answer an HEAD method with the prerender = false

removing it solves the issue.

2 Likes

Hi @eidolon-design, thanks for sharing the solution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.