diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index a2d34ae..7c5a307 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -1,10 +1,12 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
-{{- if or $.IsHome $.IsSection -}}
+{{- if $.IsHome -}}
+{{- $pages = $pctx.RegularPages -}}
+{{- else if $.IsSection -}}
{{- $pages = $pctx.RegularPagesRecursive -}}
{{- else -}}
-{{- $pages = $pctx.Pages -}}
+{{- $pages = $pctx.RegularPagesRecursive -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
@@ -26,7 +28,7 @@
{{ printf "" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
- {{- if ne .URL "search" -}}
+ {{- if ne .RelPermalink "/search/" -}}
-
{{ .Title }}
{{ .Permalink }}