We create RSS feeds on our Wordpress-based website which have been working for 3-4 years. Suddenly, a couple of months ago, they have all become "invalid" in the eyes of Apple, Google, Spotify, and various RSS validators. The error I'm getting is "Invalid content type for feed" in this validator:
The detailed view shows that, in the HTTP headers, the Content-Type is set to text/html, whereas I see nothing of the like when I navigate to it manually: https://www.ananda.org/video/series/life-lessons-in-unexpected-places/podcast
This is the beginning of my file (after setting some variables). Nothing strange that I can see. The headers are clearly sent as text/html :
/**
* Output the podcast feed
*/
header("Content-Type: text/xml;charset=utf-8");
//header("content-type: application/rss+xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?' . '>'; // Have to split up the PHP-triggering bit
?><rss version="2.0"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
Alright, I got it. Markus Zeller proposed I check using curl -vvv -i https://www.ananda.org/video/series/life-lessons-in-unexpected-places/podcast
. Once I did so, I saw that my Firewall (Sucuri) was blocking the requests. After adjusting the settings, things went back to normal.