Posts Tagged ‘optimization’

Tweaking WordPress – Sitemap

March 31st, 2010

 

Way To Improve Your Content Overview

 

 

 

I was looking for some site map solution that would satisfy my picky needs (to be seen as wp page not as wp post and to show list of categories with posts inside them). Sitemap is cool webmaster tool. It helps visitor to easy navigate through your site. It shows page structure and also, some sitemap WordPress plugins create sitemap.xml file that is very useful when search engines map your site. I found couple that were partially good enough. First was WP-Archives by Jim Penaloza Calixto (more info at http://blog.unijimpe.net/, wp plug-in download url – http://downloads.wordpress.org/plugin/wp-archives.zip). It was easy and simple to install and configure. It is installed as post and it shows posts in chronological order (but not what category they belong) with day/month info. The second was PS Auto Sitemap by Hitoshi Omagari (more info at http://www.web-strategy.jp/wp_plugin/ps_auto_sitemap/, wp plug-in download url – http://downloads.wordpress.org/plugin/ps-auto-sitemap.zip). It had visually all that I wanted (categories with list of posts that belong to them), but it was implemented as a post. I didn’t want that (yes, I know I could easily put it in sidebar as a link, but I wanted it to be on the top with other page links). So I was using the WP Archives plug-in for a while. It looked like this:


Old Sitemap

 

When I managed to find more free time, I decided to fix this. I used PS Auto Sitemap plug-in and did some simple code change in php.

After plug-in installation, I edited header.php of my current theme and I put something like this at the place where pages are being listed:

<li <?php if($post->ID == xxx) echo ‘class=”current_page_item”‘; ?>><a href=”http://yoursite/post-name-xxx”>Post Name</a></li>

Here, xxx is ID of your plug-in post that you can find in your post URL at the end, or in _posts table of your WordPress database. In my case ID was 391, table name was wp_posts, page url was www.geekwidget.com and post name was Sitemap Widget, and it looked like this:


Header Tweak

 

Now, it was still a post. In some themes, like in one that I am using, it had previous post and next post links whenever a post was separately opened. Since I was picky, as mentioned, I wanted to change that, too. I edited single.php in same folder and put something like this:

<?php if ($post->ID != xxx) { ?>

<div>
<div><?php previous_post_link(‘&laquo; %link’) ?></div>
<div><?php next_post_link(‘%link &raquo;’) ?></div>
</div>

<?php } ?>

The xxx part was again plugin post id. In my case it looked like this:


Single Tweak

 

After that I had what I wanted:


New Sitemap

 

 

Google’s SEO Starter Guide – Easy Navigation

March 20th, 2010

 

Make Your Site Easier To Navigate

 

 

 

The navigation of a website is important in helping visitors quickly find the content they want. It can also help search engines to understand what content the webmaster thinks is important. Although Google’s search results are provided at a page level, Google also likes to have a sense of what role a page plays in the bigger picture of the site.

All sites have a home or “root” page, which is usually the most frequented page on the site and the starting place of navigation for many visitors. Unless your site has only a handful of pages, you should think about how visitors will go from a general page (your root page) to a page containing more specific content. Do you have enough pages around a specific topic area that it would make sense to create a page describing these related pages (e.g. root page -> related topic listing -> specific topic)? Do you have hundreds of different products that need to be classified under multiple category and subcategory pages?

 

 


SEO Guide Navigation1


The directory structure for our small website on baseball cards

 

 

A sitemap (lower-case) is a simple page on your site that displays the structure of your website, and usually consists of a hierarchical listing of the pages on your site. Visitors may visit this page if they are having problems finding pages on your site. While search engines will also visit this page, getting good crawl coverage of the pages on your site, it’s mainly aimed at human visitors.

An XML Sitemap (upper-case) file, which you can submit through Google’s Webmaster Tools, makes it easier for Google to discover the pages on your site. Using a Sitemap file is also one way (though not guaranteed) to tell Google which version of a URL you’d prefer as the canonical one (e.g. http://brandonsbaseballcards.com/ or http://www.brandonsbaseballcards.com/; more on what’s a preferred domain). Google helped create the open source Sitemap Generator script to help you create a Sitemap file for your site. To learn more about Sitemaps, the Webmaster Help Center provides a useful guide to Sitemap files.

 

 

Good practices for site navigation

 

• Create a naturally flowing hierarchy – Make it as easy as possible for users to go from general content to the more specific content they want on your site. Add navigation pages when it makes sense and effectively work these into your internal link structure.
Avoid:
•• creating complex webs of navigation links, e.g. linking every page on your site to every other page
•• going overboard with slicing and dicing your content (it takes twenty clicks to get to deep content)

• Use mostly text for navigation – Controlling most of the navigation from page to page on your site through text links makes it easier for search engines to crawl and understand your site. Many users also prefer this over other approaches, especially on some devices that might not handle Flash or JavaScript.
Avoid:
•• having a navigation based entirely on drop-down menus, images, or animations (many, but not all, search engines can discover such links on a site, but if a user can reach all pages on a site via normal text links, this will improve the accessibility of your site; more on how Google deals with non-text files)

• Use “breadcrumb” navigation – A breadcrumb is a row of internal links at the top or bottom of the page that allows visitors to quickly navigate back to a previous section or the root page. Many breadcrumbs have the most general page (usually the root page) as the first, left-most link and list the more specific sections out to the right.

 

 


SEO Guide Navigation2


Breadcrumb links appearing on a deeper article page on our site

 

 

• Put an HTML sitemap page on your site, and use an XML Sitemap file – A simple sitemap page with links to all of the pages or the most important pages (if you have hundreds or thousands) on your site can be useful. Creating an XML Sitemap file for your site helps ensure that search engines discover the pages on your site.
Avoid:
•• letting your HTML sitemap page become out of date with broken links
•• creating an HTML sitemap that simply lists pages without organizing them, for example by subject

• Consider what happens when a user removes part of your URL – Some users might navigate your site in odd ways, and you should anticipate this. For example, instead of using the breadcrumb links on the page, a user might drop off a part of the URL in the hopes of finding more general content. He or she might be visiting http://www.brandonsbaseballcards.com/news/2008/upcoming-baseball-card-shows.htm, but then enter http://www.brandonsbaseballcards.com/news/2008/ into the browser’s address bar, believing that this will show all news from 2008. Is your site prepared to show content in this situation or will it give the user a 404 (“page not found” error)? What about moving up a directory level to http://www.brandonsbaseballcards.com/news/?

• Have a useful 404 page – Users will occasionally come to a page that doesn’t exist on your site, either by following a broken link or typing in the wrong URL. Having a custom 404 page that kindly guides users back to a working page on your site can greatly improve a user’s experience. Your 404 page should probably have a link back to your root page and could also provide links to popular or related content on your site. Google provides a 404 widget that you can embed in your 404 page to automatically populate it with many useful features. You can also use Google Webmaster Tools to find the sources of URLs causing “not found” errors.
Avoid:
•• allowing your 404 pages to be indexed in search engines (make sure that your webserver is configured to give a 404 HTTP status code when non-existent pages are requested)
•• providing only a vague message like “Not found”, “404″, or no 404 page at all
•• using a design for your 404 pages that isn’t consistent with the rest of your site

 

 

Google’s SEO Starter Guide – URL Structure

March 19th, 2010

 

Improve The Structure of Your URLs

 

 

 

Creating descriptive categories and filenames for the documents on your website can not only help you keep your site better organized, but it could also lead to better crawling of your documents by search engines. Also, it can create easier, “friendlier” URLs for those that want to link to your content. Visitors may be intimidated by extremely long and cryptic URLs that contain few recognizable words.

 

 


SEO Guide URL Structure1


A URL to a page on our baseball card site that a user might have a hard time with

 

 

URLs like these can be confusing and unfriendly. Users would have a hard time reciting the URL from memory or creating a link to it. Also, users may believe that a portion of the URL is unnecessary, especially if the URL shows many unrecognizable parameters. They might leave off a part, breaking the link.

 

Some users might link to your page using the URL of that page as the anchor text. If your URL contains relevant words, this provides users and search engines with more information about the page than an ID or oddly named parameter would.

 

 


SEO Guide URL Structure2


The highlighted words above could inform a user or search engine what the target page is about before following the link

 

 

Lastly, remember that the URL to a document is displayed as part of a search result in Google, below the document’s title and snippet. Like the title and snippet, words in the URL on the search result appear in bold if they appear in the user’s query.

 

 


SEO Guide URL Structure3


A user performs the query [baseball cards]

 

 


SEO Guide URL Structure4


Our homepage appears as a result, with the URL listed under the title and snippet

 

 

Below is another example showing a URL on our domain for a page containing an article about the rarest baseball cards. The words in the URL might appeal to a search user more than an ID number like “www.brandonsbaseballcards.com/article/102125/” would.

 

 


SEO Guide URL Structure5


A user performs the query [rarest baseball cards]

 

 


SEO Guide URL Structure6


A deeper page, with a URL that reflects the type of content found on it, appears as a result

 

 

Google is good at crawling all types of URL structures, even if they’re quite complex, but spending the time to make your URLs as simple as possible for both users and search engines can help. Some webmasters try to achieve this by rewriting their dynamic URLs to static ones; while Google is fine with this, we’d like to note that this is an advanced procedure and if done incorrectly, could cause crawling issues with your site. To learn even more about good URL structure, we recommend this Webmaster Help Center page on creating Google-friendly URLs.

 

 

Good practices for URL structure

 

• Use words in URLs – URLs with words that are relevant to your site’s content and structure are friendlier for visitors navigating your site. Visitors remember them better and might be more willing to link to them.
Avoid:
•• using lengthy URLs with unnecessary parameters and session IDs
•• choosing generic page names like “page1.html”
•• using excessive keywords like “baseball-cards-baseball-cards-baseballcards.htm”

• Create a simple directory structure – Use a directory structure that organizes your content well and is easy for visitors to know where they’re at on your site. Try using your directory structure to indicate the type of content found at that URL.
Avoid:
•• having deep nesting of subdirectories like “…/dir1/dir2/dir3/dir4/dir5/dir6/page.html”
•• using directory names that have no relation to the content in them

• Provide one version of a URL to reach a document – To prevent users from linking to one version of a URL and others linking to a different version (this could split the reputation of that content between the URLs), focus on using and referring to one URL in the structure and internal linking of your pages. If you do find that people are accessing the same content through multiple URLs, setting up a 301 redirect from non-preferred URLs to the dominant URL is a good solution for this.
Avoid:
•• having pages from subdomains and the root directory (e.g. “domain.com/page.htm” and “sub.domain.com/page.htm”) access the same content
•• mixing www. and non-www. versions of URLs in your internal linking structure
•• using odd capitalization of URLs (many users expect lower-case URLs and remember them better)