Feed are changing how we write links in our blog posts. Have you noticed?
There are two types of links. Absolute links are the most commonly found links in web pages today. They go directly to the source such as:
https://lorelle.wordpress.com/2007/02/25/monetizing-wordpress-plugins/
A relative link is one that links relative to the page without the full address, such as a link within the blog’s site. A relative link to the same article from within this blog would be:
<a href="/2007/02/25/monetizing-wordpress-plugins/" title="Monetizing WordPress Plugins">Monetizing WordPress Plugins</a>
When your blog post is delivered via feed to a feed reader, relative links have no “relative” from which to determine a starting place. When clicked, they will link to nothing or return a 404 Page Not Found error. This is not a good link to include in a feed.
When I first developed the Tagging Bookmarklet for WordPress and WordPress.com users, I included relative links for the site search tags. At the time, my feeds were set to excerpt or summary, so the bottom of my posts with the site search tags was never in my feeds. I have recently changed to selective full content feeds and now the site search tags appear in the feeds – as relative links. Yikes! Time to change them to absolute direct links!
A common mistake I find in many blog posts is the use of the URL without the http://
. This turns a link in a blog post like:
<a href="www.blogherald.com/2007/05/03/if-you-see-this-the-content-is-stolen/" title="If you see this the content is stolen">If You See This The Content is Stolen</a>
to this from my blog:
<a href="https://lorelle.wordpress.com/www.blogherald.com/2007/05/03/if-you-see-this-the-content-is-stolen/" title="If you see this the content is stolen">If You See This The Content is Stolen</a>
Do you think that link will go anywhere? The browser assumes that since the http://
is missing, it’s a relative link. It’s not. It’s a link to nowhere that needs fixing.
Any time you link within your blog post to another post on your blog, you may be tempted to use relative links – but don’t. Use absolute links so the link will work from within your blog’s feeds. And get the http://
part of the address in there so the browser knows the link goes to a web page.
Check Your WordPress Theme Template Files for Relative Links
While you are at it, check throughout your full version WordPress blog and Themes for any relative links that might be slipping into your feed. For example, if you use a WordPress Plugin for generating related posts or other post meta data, are the links full absolute links or relative? They are usually absolute, but look closer.
I’ve done a lot of custom work with my WordPress template files on other blogs which includes using a combination of template tags which generate absolute links and hand coding other links as relative links. Lost in the code confusion, I’ve often overlooked these relative links. When that information goes into a feed, those links lead nowhere.
Define Your Link Destinations
Whether viewing your blog post on your blog or via feed readers, if you link to a non-traditional type of link like a file, email, or ftp site, let your reader’s know before they click.
If you are linking to a file, call it a file and put the size of the file in parentheses:
get the file, How To Do It (1.5M), for more information
If you are linking to a PDF file, put (PDF) after the file name. If it’s an FTP site, use (FTP) in the parentheses after the link if the link anchor text isn’t clear. For an email link, make sure it’s clear that it is an email and not a link to a contact form.
There are times when the link you want to link to is only available for a short time, such as a newspaper article which requires registration or membership fees to access after a week or two. Explain this in the text around the link or add an explanation in or after the link in parentheses such as article on DNA research trends (requires registration).
Since your blog readers now have options for how they read their blogs, especially with the improvements in feed readers, help them understand what it is they are going to click on before they click.
Related Articles
- Benefits and Uses of Website Feeds
- Customizing Your Feed Titles
- Beauty is Only Skin Deep: Designing Blogs For Feeds, Search Engines and Audience
- Playing with WordPress.com New Sidebar Widgets
- WordPress.com Widgets – Customizing Your WordPress.com Theme Sidebar
- Customizing RSS Feed Links for WordPress.com and WordPress Sidebar Widgets
- Create RSS Feeds on Any Web Page
- Don’t You Know What a Feed Is Yet? Get To Know Your Feeds!
- WordPress Plugins for Feeds
- Creating Custom Feeds For Sites Without Feeds
- One Year Anniversary Review: What are Feeds?
- Content Theft from Feeds – It’s Time To Take Action
- Do You Need Permission to Use Feeds
- Feeding on Lorelle on WordPress
- Digital Fingerprints Help Track Blog Content Theft
- Blog Herald Feeds and Customizing Your WordPress Blog Feeds
Site Search Tags: feeds, wordpress feeds, writing links, wordpress links, how to write links, relative links, absolute links, link troubleshooting, links in feeds, feed links, troubles with links, blogging tips, wordpress tips, web wise, wordpress themes
Copyright Lorelle VanFossen, member of the 9Rules Network
Subscribe Via Feedburner Subscribe by Email
20 Comments
I use absolute links but was wondering whether I’d change them all to relative links so I could move my blog. From what you write here, I guess it’s not such a good idea after all. But then how do I move my blog? Find/Replace?
Find/replace on the wordpress.xml export file.
http://trac.wordpress.org/ticket/890
But it’s very, very old and it hasn’t really gained much traction…
One word:
absolutifier
I had a problem with this a while back, especially when I linked to #comments. After I installed this plugin, it’s all good now!
I’d highly recommend checking it out.
Nathan
When was the last time anyone used relative links in a blog post anyway? 🙂
I also meant to say that relative links in the template files, outside of the blog posts wouldn’t matter from the perspective of feeds.
Mandarine: I thought I’d included these in my post. Much apologizing.
Search and Replace in WordPress MySQL Database and phpMyAdmin WordPress Plugin: Database Access from Administration Panels will help you to search the database and do a replacement. Just backup, backup, backup, backup, backup first. And be VERY careful with your search and replace. Make sure it includes
href="/index.php..."
. If you use permalinks, this could be VERY hard to find a unique phrase for search and replace.Carthik, if you move your blog with the Theme, and not pay attention to those relative links in the template files, or make a change to your URL, they will get you.
The key issue is those who use them in the posts, but I’ve been caught, as have others, with relatives links in template files being missed. Sure, it may not impact feeds, but it does impact your blog.
What does impact your feed links is errors in linking, such as not using the http:// or WordPress stripping them out because of a malformed link code, or using relative links.
I started using relative links to pages in WordPress because if I use absolute links, it posts the blog entry as a comment to the page. This might be a bug, but a solution someone offered was to use relative links instead. Does anyone know another way to solve this problem?
Alison: disallow comments on your pages. Problem solved – unless you need to allow readers to comment on your static pages, but mostly I can’t imagine you would.
I just had one of my readers who uses a feed email me this week to inform me that I was using relative links. I hadn’t even considered that a feed reader would leave relative links uncorrected until reading what he had told me!
Alison, what you are talking about is a trackback. It’s automatic. It also helps link one blog post to another. For instance, if I’m writing about a topic that includes an intrasite link to another post I’ve written, when that post is published, it puts a trackback in the blog post (using absolute direct links) and I don’t have to go back to the linked-to post and add a link to the new post for more information or reference. I still can, but trackbacks do the work for me.
If you don’t like it, delete the trackback in your comments panel. But DO NOT turn off comments just to avoid trackbacks. They are working as they should. It’s just a matter of understanding why.
Lorelle,
Yes, it happens automatically. Even if I turn off comments, it still leaves one as a trackback. I went and fixed all the links in my previous posts and then deleted all the trackback comments that got added. I guess this is the only way to keep having absolute links.
Thanks for the advice!
Alison, just remember, it’s doing what it is supposed to do, and you can benefit from those trackbacks. Good luck!
I know this is a little different, but I’ve just started reading through a feed, and the thing that’s really changed for me is commenting. It adds another whole layer onto that process.
Allison: Actually, that is a pingback, not a trackback. And if you really want to prevent it, don’t use relative paths.. Use a plugin! 🙂
No-self-pings stops these pingbacks from your own site:
http://blogwaffe.com/2006/10/04/421/
http://dev.wp-plugins.org/browser/no-self-ping/trunk/no-self-pings.php?format=txt
Having relative URLs in your RSS feed is a sign of a problem with the RSS generation. It should automatically prepend your site address including ‘http://’. This is part of the RSS standard, as it is well known that relative URLs are useless in that context. You might want to use: http://feedvalidator.org/ .
Within your site, best practices for links is to always use relative links for your own materials. While most of us never move our sites, it will still prevent the problem that Allison mentions with pingbacks.
Otto,
Thanks for the tip. I am using the plugin you suggested and it works!
Yes, that’s true. We also can’t use relative links, because a link to the same file can be found in different pages, like: example.wordpress.com and example.wordpress.com/articles/name-of-article
I went and fixed all the links in my previous posts and then deleted all the trackback comments that got added.
6 Trackbacks/Pingbacks
[…] Feeds Change How You Write Links « Lorelle on WordPress […]
[…] Feeds Change How You Write Links […]
[…] Feeds Change How You Write Links […]
[…] Feeds Change How You Write Links […]
[…] Feeds Change How You Write Links […]
[…] Feeds Change How You Write Links […]