Forum Topic: how to handle /feed/ requests

Forum: .htaccess Forum : General • Posted by RememberToForget • Updated:

I’m looking at my server error logs and seeing that the number one request I get is for www.example.com/feed/

How should I handle this considering I barely even know what an RSS feed is, and I won’t be blogging anytime soon. I used to run wordpress but I don’t anymore; I stopped using it a couple years ago in favor of a one-page site.

Would a simple htaccess redirect do the trick? Redirect /feed/ requests to the homepage? I wonder what’s an appropriate way to handle this particular kind of request.

I’ve been trying to find answers on google but everything that comes up presupposes that I know what an RSS feed is, I’m into that whole scene, I’m a “feedburner” guy, etc.

Alright thank you. :)

4 Replies to “how to handle /feed/ requests”

Posted by Jeff Starr

Yep you got the idea, just a simple redirect to the home page should be good. Something like this placed in the root .htaccess file:

RedirectMatch 301 ^/feed/?$ http://example.com/

That will match and redirect requests for either:

http://example.com/feed
http://example.com/feed/

But WP generates a LOT of feeds, so if you want to just redirect them all and be done with it, a slight modification:

RedirectMatch 301 /feed/?$ http://example.com/

That will match any request for “/feed/” with or without the trailing slash. Of course this is assuming you have WP permalinks enabled.

Posted by RememberToForget •

Beautiful; thank you.

So what will be the subjective experience of the ‘feed guy’ when his ‘reader’ looks for /feed/ and htaccess sends him to homepage? I’m just curious, it’s not that important. I’m having a hard time picturing what the feed world is all about, and the last thing I want to do right now (after learning jquery, css, html, and now htaccess) is to figure out what the feeder world is all about by reading through heaps of tech documents.

It’s funny to me that the number one request on my site (online since 2005 just like yourself) is for “feed” and I never knew anything about this until I read your book and looked at my error logs. :)

Ignorance. Wow.

Anyway my logs are pretty boring compared to yours. I almost wish I was getting attacked so I could get into a fight with people, and win.

Posted by Jeff Starr

Just realized one of my favorite online tools includes a check for the referrer — I hope it helps!

Posted by RememberToForget •

Oh man, good one; thanks.