diff --git a/lib/feed2email/feed.rb b/lib/feed2email/feed.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/feed.rb
+++ b/lib/feed2email/feed.rb
@@ -99,7 +99,7 @@ module Feed2Email
       http.use_ssl = (parsed_uri.scheme == 'https')
       response = http.head(parsed_uri.request_uri)
 
-      if response.code == '301' # Moved Permanently
+      if response.code == '301' && response['location'] =~ %r{\Ahttps?://}
         self.uri = response['location']
         log :warn, "Got permanently redirected! Updated feed location to #{uri}"
       end
Confine permanent redirection to HTTP(S) URIs

Inspired by what OpenURI does to address CVE-<I>-<I>