RSS Feed Text
Add a line before or after each post in your feeds, with links to the post, your site and the author, so automatic copies of your feed credit the original.
On this page
- Why add a line to your feed
- Set it up
- Variables
- Examples
- Where the line appears
- Check the result
- Coming from another SEO plugin
- Performance
- FAQ
- Does the line appear on my website?
- Will it stop scrapers?
- Can I put HTML in the text?
- Why does the author link go to the profile website?
- Does it change comment feeds?
- Related reading
Your RSS feed is read by feed readers, email newsletters and podcast-style apps, and also by sites that copy posts automatically and publish them as their own. RSS Feed on Hydrogen SEO's General screen, added in version 0.0.29, puts a line of your choice before and/or after every post in your feeds, such as:
The post How to Descale a Kettle appeared first on Brew Notes.
where the post title is a link to the post and the site name a link to your homepage. It is empty by default, free, and needs no account.
Why add a line to your feed
When another site republishes your feed automatically, it usually takes the post's content as it is, and that includes your line. The copy then carries a link back to the original:
- Readers of the copy can find you. The link says where the post came from and takes them there.
- Search engines see a link from the copy to the original. That is one more signal about which page came first, alongside the dates on which each page was found.
It also gives a credit line to people who read you in a feed reader, where your site's design and navigation are not visible.
What it cannot do is stop the copying. A scraper that strips links or rewrites content will remove the line too. See what to put in your RSS feed footer for the other measures that help.
Set it up
- In wp-admin, open Hydrogen SEO → General (in the Settings group) and open the RSS Feed section.
- Type into Before each post, After each post, or both. Type
@to insert a variable from the list. - Watch Preview in a feed reader on the right: it shows a sample post with your lines above and below its text, links underlined.
The General screen saves a couple of seconds after you stop typing, or straight away with Save. Feeds include the line from the next request, though feed readers and caching plugins may hold the previous copy for a while.
To remove the line, clear the field. An empty field adds nothing.
Variables
Three variables exist only here, because they print links:
| Variable | Prints |
|---|---|
%post_link% | The post's title, linked to the post |
%site_link% | Your site name, linked to the homepage |
%author_link% | The author's display name, linked to their author archive. When author archives are disabled, it links to the website in the author's profile instead, or prints the name without a link if the profile has none |
These template variables work too, as plain text: %title%, %site_name%, %tagline%, %separator%, %author_name%, %published%, %modified%, %permalink%, %category%, %categories%, %tags%, %post_type%, %currentyear%, %currentdate% and %org_name%. Their values are escaped, and any markup in a title is shown as text, so a post title containing < or & cannot break the feed's HTML.
%excerpt% and %content% are not available here: the feed already carries the post's text, and for a password-protected post they would print what the password protects. Category and search variables have no value in a feed either. The @ list offers only the variables that work, and anything else that looks like a variable is printed as you typed it.
Examples
| Goal | Text |
|---|---|
| The classic attribution line, after the post | The post %post_link% appeared first on %site_link%. |
| Name the author, before the post | By %author_link% for %site_link% |
| Date and source, after the post | Originally published on %site_link% on %published%. |
| An invitation, after the post | Read %post_link% on %site_link% for comments and related posts. |
Short lines work best. Feed readers show the before-line above the opening paragraph, so a long one pushes your post's first sentence out of the preview many readers see.
Where the line appears
- Every post feed WordPress serves, in RSS 2.0 and Atom: the main
/feed/, and category, tag and author feeds while those archives exist. - In both the full text and the summary. WordPress's Settings → Reading → For each post in a feed, include decides whether feeds carry the full post or an excerpt; the line is added to whichever is sent, and to the description field that accompanies it.
- Each line as its own paragraph, so it reads as a separate sentence in any reader.
Comment feeds are not changed. Neither is the post as it appears on your site: the line exists only in feeds.
Check the result
Open https://yoursite.com/feed/ in a browser, or fetch it:
curl -s "https://yoursite.com/feed/" | grep -m 3 "appeared first on"
Search for a word from your line. If it is missing, clear your page cache or caching plugin's cache, since feeds are often cached like pages. Then subscribe to the feed in any feed reader to see it as readers do.
Coming from another SEO plugin
Tools → Import SEO Data brings the before and after text across (version 0.0.29 and later). The previous plugin's link tags for the post, the site and the author are converted to %post_link%, %site_link% and %author_link%, and other tags to their Hydrogen SEO equivalents. The import preview shows the text before anything is written. See switch from another SEO plugin.
Performance
With both fields empty, which is the default, nothing related to this feature runs: no code is attached to your feeds at all. With a line set, it is added while the feed is built, with no extra database queries, and nothing changes on the rest of your site.
FAQ
Does the line appear on my website?
No. Only in your RSS and Atom feeds. Visitors to the post on your site do not see it.
Will it stop scrapers?
No. It makes an automatic copy point back to you, which is useful, but a scraper can delete it. Treat it as attribution, not protection.
Can I put HTML in the text?
No. The text is escaped and printed as written. Links come from the three link variables, which build the HTML for you.
Why does the author link go to the profile website?
Because author archives are set to Disabled on the Archives card of Titles & Meta. A link to a disabled archive would only redirect to the homepage, so the author's own website is used. Set author archives to Index or No index and the link goes to the author archive again.
Does it change comment feeds?
No. Comment feeds stay as WordPress builds them.