Calls-To-Action: Making Them Fit Makes All the Difference
Tuesday, August 31st, 2004by Karon Thackston
by Karon Thackston
Date created: 22 August 2004
If you’re having problems getting your whole site indexed then you should add a search engine friendly site map to your site. You’ll need a site map when:
Whatever your reason (or for no reason) a site map will not hurt your search engine position and may help.
A site map consists of anchor links (<a href>) links pointing to every page in your site. If you’re an eCommerce site this would include all product pages and all category pages; if you’re a general information site then every article would be indexed. It might be necessary to set up more than one site map if your site is large enough.
The text of the link should be the search phrase you want the target page found for. Use the product name, a key search phrase, etc.
Once your site map is built you will want to link to it from all pages using a standard anchor link (<a href>), this link is usually put at the bottom of the page as it’s not designed to be part of the main navigation. The reason you want all pages is to provide visibility to the site map from any landing page so that it’s useful to your human visitors as well as the automated variety.
Updated: 10 May 2005
By Dylan Downhill
This is a quick guide to displaying an RSS feed on your website. It is not meant to be extensive, it is meant to get your feet in the door of displaying content using RSS in the quickest time possible.
The two main ways to display RSS data on a website is either through client side javascript or through server side scripting. The advantage of client side javascript is it offloads the processing to the site visitor, the disadvantage is the search engines don’t run client side code and so all your syndicated RSS content will not be indexed. From a search engine optimization point of view it is best to render the RSS data feed using server side scripts.
There are many RSS parsers available for free on the internet. The two major PHP based RSS parsers available for use are CaRP and MagpieRSS. I personally found the documentation for CaRP lacking and I felt I didn’t have enough control over the way the data was output. As this is a quick guide I will walk through using MagpieRSS to display an RSS data feed on your site.
The first thing to do is download the latest copy of MagpieRSS. When you’ve downloaded it, if you’re using WinZip you’ll hit an issue with the TAR file having an unrecognized extension. The way around this is to extract the TAR file to a temporary location and rename the extension to ‘.tar’ , then double-click on the file and WinZip will correctly recognize the TAR file and give you the ability to extract the files.
Extract the MagpieRSS code into a directory on your PC and upload to your web server (remember to keep the folder structure as you find it in the TAR file).
Make sure the page you want the feed displayed on is a PHP file (usually designated with a .php extension). Then include the following code:
<?php
require_once ‘../magpierss/rss_fetch.inc’;$url = ‘http://www.elixirsystems.com/seo_tips/seo_tips.rss’ ;
$rss = fetch_rss($url);echo ‘Site: ‘ , $rss->channel['title'], ‘ <br / >’;
if ( $rss and !$rss->ERROR) {
????foreach ($rss->items as $item ) {
????????echo ‘ <p><a href=”‘ . $item[link] . ‘”>’ . $item[title] . ‘ </a><br / >’;
????????echo ‘Publish Date: ‘ . $item[pubdate] . ‘ <br / >’;
????????echo $item[ description ] . ‘ </p>’ ;
????}
} else {
????echo ‘RSS Error: ‘ . $rss->ERROR . ‘ <br / ><br />’ ;
}
?>
The resultant page should look like the SEO Tips index page on this site.
If the file was loaded locally then your code would change slightly as follows:
<?php
require_once ‘../magpierss/rss_fetch.inc’;$rss_file = ‘../seo_tips/seo_tips.rss’;
$rss_string = read_file($rss_file);
$rss = new MagpieRSS( $rss_string );echo ‘Site: ‘ , $rss->channel['title'], ‘ <br / >’;
if ( $rss and !$rss->ERROR) {
????foreach ($rss->items as $item ) {
????????echo ‘ <p><a href=”‘ . $item[link] . ‘”>’ . $item[title] . ‘ </a><br / >’;
????????echo ‘Publish Date: ‘ . $item[pubdate] . ‘ <br / >’;
????????echo $item[ description ] . ‘ </p>’ ;
????}
} else {
????echo ‘RSS Error: ‘ . $rss->ERROR . ‘ <br / ><br />’ ;
}
?>
Note – changed lines from previous example in blue.
That’s all you need to do. If you want to change the format of the output change the foreach loop, on this site I use the full output for the index pages, and a partial output on the site map by removing the published date and the description.
The Jawfish application uses client side Javascript to display RSS feeds on the visitors browser. As mentioned above the data from these feed will not be indexed by the search engines and therefore your page will appear blank to the search engines. Jawfish can be downloaded here.
Our content available for syndication using RSS can be found here.
If you find these instructions helpful or if you find an error let me know.
10 May 2005 – Thanks to Gav (from Mini Tutorials) for making it XHTML compliant.
This is a quick guide to publishing your web content through an RSS feed. It is not meant to be extensive, it is meant to get your feet in the door of publishing content using RSS in the quickest time possible.
A RSS feed is simply an XML file containing information on pages within your site. The RSS file format is as follows:
<?xml version=”1.0″ ?>
<rss version=”2.0″>
<channel>
<title>Title Text </title>
<link>Link to site’s home page </link>
<description>Description of the feed</description><item>
<title>Page Title</title>
<description>Page Description</description>
<link>Page Link</link>
<author>Email to Contact You On</author>
<pubDate>Published Date</pubDate>
</item></channel>
</rss>
Where the contents from <item> to </item> are repeated for all the content you want to publish through the RSS file. An example feed would look like:
<?xml version=”1.0″ ?>
<rss version=”2.0″>
<channel>
<title>Search Engine Optimization Tips</title>
<link>http://www.elixirsystems.com</link>
<description>
Search engine optimization tips from Elixir Systems. Helpful advice covering
all aspects of the search engine optimization process.
</description><item>
<title>Monitor and Tweak Your Way to Great Search Engine Rankings – Part 1</title>
<description>
The final stage of the search engine optimization loop, monitoring your site’s rankings and
tweaking the site as necessary to bring up any keywords that are not ranked well.
</description>
<link>http://www.elixirsystems.com/articles/a040709.php</link>
<author>customerservice@elixirsystems.com</author>
<pubDate>24 Jul 04 15:00:00 +0700</pubDate>
</item></channel>
</rss>
Information on RSS date format (external link).
Now you have your RSS file set up and uploaded to your website you’ll want to run it through a RSS Validator – this ensures the contents meets the RSS specification and ensures anyone who wants to use your content can. To find suitable tools type ‘rss validator’ into your favorite search engine, the one I use and prefer due to it’s helpful error messages is Feed Validator at http://feedvalidator.org/
If the validator comes back with the error ‘Feeds should not be served with the “text/plain” media type‘ you will need to define the .rss file extension as a RSS file. If you’re running Apache the easiest way to do this is to create a .htaccess file in your website’s root directory and add the following lines:
addtype application/rdf+xml rdf
addtype application/rss+xml rss
addtype application/atom+xml atom
addtype application/xml xml
These lines will take care of your current and future RSS/XML/atom needs. Microsoft IIS this same task can be completed using the IIS MMC.
Provide the feed as both a hot link and as a URL that can be cut and pasted into the visitors favorite RSS reader. Example RSS links can be found here.
RSS feeds should also be declared in the <head> section of the HTML for the pages on your site. Example code might look like:
<link rel=”alternate” type=”application/rss+xml” title=”Newsletter” href=”http://www.elixirsystems.com/newsletter/archive/newsletter.rss” />
<link rel=”alternate” type=”application/rss+xml” title=”Press Releases” href=”http://www.elixirsystems.com/press_releases/press_releases.rss” />
This will then cause the latest browsers (IE7, Mozilla 2) to offer the visitor the option to sign up for one of your feeds.
One of the easiest ways to get your content known by the search engines is to load it into the MyYahoo part of the Yahoo! search engine.
You’ve gone to all the trouble of setting up an RSS feed, you might as well use it. On this site we use it for the index pages for the documents, and also to provide cross reference information (see the SEO Tips index page where the top half is local content, the bottom half is useful information in the articles directory). The feed is also used in the sitemap to ensure it always stays up to date with the changing content on the site.
Once you have your RSS data feed up and running you might want to add to it. This document describes the RSS 2.0 specification in an easy to read format.