Lately I've been migrating a few websites from Movable Type to WordPress. One of the SEO issues involved with that is supporting the old site's URLs so that existing page rankings don't drop off en masse.
A common Movable Type URL format appends the entry id to the URL which makes it easy to redirect to the correct content IF you have preserved the entry id from MT as the new post id in WP, other times it can be a lot more convoluted.
One of the functions I sometimes need to employ is pretty uncommon, (which is not surprising due it's rare use), so I thought I'd create a quick post here so I can can easily find it next time I need it.
The function is url_to_postid()
This function returns the id for a post or page from a given URL. I like to this of this function as the reverse of the commonly used get_permalink().
It's pretty hard to turn up any useful search results for this function so hopefully this page will help somebody when they need it.
Showing posts with label SEO. Show all posts
Showing posts with label SEO. Show all posts
Thursday, 31 March 2011
WordPress Post ID from Permalink
Tuesday, 5 May 2009
Common Sense SEO Tips

Here are my best simple tips to get you found via Search Engines
Search Term Targeting
Think about what terms people would type into a search engine if they wanted to find your site. It's better to get 10 visitors who will be interested in your content than 100 visitors who will immediately leave and never return. Compile a list of terms you would expect your site to be well ranked for and target those terms. Make sure these terms appear in your page's body text. Keep the list in a spreadsheet and record your Search Engine ranking so you can measure improvement.
Good Content
Make sure you have a decent chunk of crawlable text. Webcrawlers don't index text if it's just in an image. Make sure the content includes the terms you want to be found for. If your product or service is regional then include those details on every page (the page footer does nicely), then you'll be more likely to be found when people search for "kitten jugglers London SW15".
Page Title
The content of the page's <title> tag is taken as a description of the page content. This is a key index for your pages. Make sure the title is clear but succinct. Limit it to 5-10 words, including your company name. Don't use the same title on multiple pages or they may be grouped as one page in search engine results.
Well Formed Links
Never ever use click here links. Link text is one of the best indexing opportunities you have, don't squander it. The text in links to your pages are treated in a similar way to page titles but links to your pages are aggregrated.
Meta Tags
Do use the keyword and description metatags. Keep it clear and simple. The keywords tag is said to be less used of late due to heavy abuse, but Yahoo claims to still support it. The description tag should provide a concise explanation of your page's content.
<meta name="description" content="An introduction to the nocturnal habits of hedgehogs of United Kingdom">
<meta name="keywords" content="hedgehog United Kingdom UK Erinaceinae nocturnal insectivore furze-pig">
If your website includes mulitple languages, translated content or is not in English you should consider also using the language tag.
Seeding
If your site is brand new and hasn't been indexed yet, you can get the ball rolling by adding it to the Open Directory Project. Search engines are an incestuous bunch feeding off each other and this is a good entry point as it's used by AltaVista, A9, AOL, Ask, Clusty, Gigablast, Google, Lycos, MSN, and Yahoo.
Webmaster Tools
Google's Webmaster Tools can tell you if anything is going wrong on your site that could be affecting your search ranking. You can read about Webmaster Tools in an earlier post.
Wednesday, 15 April 2009
Analytics Debunks Charlatan
Yesterday I overheard a friend's phonecall with a salesman for an internet listing service. She runs a modest business with her website as the only advertising and bringing in enough customers to keep her booked weeks in advance.
The listing service was claiming that they could increase traffic to her site because they specialised in listing companies in her specialised field. I suggested that she should think carefully before throwing her money their way, since her website is fairly well optimised for search engines.
As it turned out, the listing service had offered her a one month free trial (which had just expired) and had been allegedly sending traffic her way already. I decided to spend a few minutes helping her evaluate the trial.
The first step was to look at their website. Sadly their homepage failed to load as most of the content was blocked by ABP - not a good start. Next we found her listing on their site, mostly content pasted from her homepage, although her business name was spelt incorrectly (twice). By this stage I was feeling underwhelmed.
So we decided to check out the traffic they've been sending to her site. Google Analytics had been in place for some time so we could easily measure the impact. The first thing we did was check the Traffic Sources report. Indeed there were 27 visits in the last month, although they never peaked higher than 2 per day and the bounce rate seemed pretty high to me.
I suggested we check on where these visitors were coming from and see if we could find out a little more about them so we set up a Custom Segment where Source contains the listing site's domain. We could see that almost all of the traffic came from London, except for 3 visits from Australia, coincidentally where the business was based. Digging further into the New vs. Returning Visitors report showed that all but one of the London visitors was the same person returning every day or so to generate traffic.
In my opinion this kind of listing service is a waste of money if you have followed the most basic SEO principals. Needless to say, my friend will not be engaging their services.
The listing service was claiming that they could increase traffic to her site because they specialised in listing companies in her specialised field. I suggested that she should think carefully before throwing her money their way, since her website is fairly well optimised for search engines.
As it turned out, the listing service had offered her a one month free trial (which had just expired) and had been allegedly sending traffic her way already. I decided to spend a few minutes helping her evaluate the trial.
The first step was to look at their website. Sadly their homepage failed to load as most of the content was blocked by ABP - not a good start. Next we found her listing on their site, mostly content pasted from her homepage, although her business name was spelt incorrectly (twice). By this stage I was feeling underwhelmed.
So we decided to check out the traffic they've been sending to her site. Google Analytics had been in place for some time so we could easily measure the impact. The first thing we did was check the Traffic Sources report. Indeed there were 27 visits in the last month, although they never peaked higher than 2 per day and the bounce rate seemed pretty high to me.
I suggested we check on where these visitors were coming from and see if we could find out a little more about them so we set up a Custom Segment where Source contains the listing site's domain. We could see that almost all of the traffic came from London, except for 3 visits from Australia, coincidentally where the business was based. Digging further into the New vs. Returning Visitors report showed that all but one of the London visitors was the same person returning every day or so to generate traffic.
In my opinion this kind of listing service is a waste of money if you have followed the most basic SEO principals. Needless to say, my friend will not be engaging their services.
Friday, 13 March 2009
Essential Add-on Tools for Firefox
Any good developer should have a few different browsers installed in order to check things are working properly in all of them. I currently have Firefox 2 and 3, Opera and IE6 installed and have IE7 on another box. I haven't gotten around to installing Chrome yet, but I guess I will have to sooner or later.
Firefox 3 is my browser of choice and here's why:
I don't like how much memory Firefox hogs, but it's much better than it used to be and maybe I should curb my tab usage. Sometimes the Shockwave Flash plugin flakes out and won't play until I disable/enable it or restart the browser, but that could also be related to tab usage too.
The following Add-ons are the reason Firefox is the first browser I'll turn to. They are incredibly valuable additions to your development toolbox. You've probably already got many of them installed.
Firebug allows you to "edit, debug, and monitor CSS, HTML, and JavaScript live in any web page." I couldn't count the number of times I've right-clicked to Inspect Element. It has a tiny footprint in your status bar when you're not using it. This is the best web debugging tool I've used.
https://addons.mozilla.org/en-US/firefox/addon/1843
Web Developer adds a toolbar and menu that allow you to manage cookies, CSS, Forms, Images, Outline elements along with a host of other tools. Highlights for me are the Cookie management, Outlining elements (to help debug layout issues) and the Error Console for debugging Javascript.
https://addons.mozilla.org/en-US/firefox/addon/60
NoScript is a security add-on that allows you to protect yourself against XSS and Clickjacking attacks by only allowing active content to run from sites that you trust. It's this flexible script blocking approach that also makes it a useful debugging tool. You probably should have it installed to see how borked your sites are - it has a huge user base.
https://addons.mozilla.org/en-US/firefox/addon/722
ScreenGrab lets you save webpages as images. You can grab the whole page or just the visible portion, or even copy it to the clipboard. No more copy+pasting sections together to screenshot a long page.
https://addons.mozilla.org/en-US/firefox/addon/1146
Adblock Plus allows you to browse without ads. It works very well and is incredibly popular because of that. Users love it, advertisers and websites dependant on ad revenue hate it. As long as flash banners keep soaking up CPU cycles, I'll keep using it.
https://addons.mozilla.org/en-US/firefox/addon/1865
YSlow for Firebug analyzes your web pages and tells you why they're slow (based on Yahoo's rules for high performance web sites). Some of the criteria is a bit subjective or inapproriate for smaller sites, but generally it offers some good tips.
https://addons.mozilla.org/en-US/firefox/addon/5369
SeoQuake SEO extension helps you "deal with search engine optimization(SEO) and internet promotion of web sites." It's possibly a little bloated for some users, but it does cover a lot of bases. It's worth checking out if you're doing any SEO work.
https://addons.mozilla.org/en-US/firefox/addon/3036
Firefox 3 is my browser of choice and here's why:
- Tabbed browsing
- Decent rendering engine
- Live Bookmarks (Feeds)
- Ctrl+U access to Page Source
- Useful Add-ons
I don't like how much memory Firefox hogs, but it's much better than it used to be and maybe I should curb my tab usage. Sometimes the Shockwave Flash plugin flakes out and won't play until I disable/enable it or restart the browser, but that could also be related to tab usage too.
The following Add-ons are the reason Firefox is the first browser I'll turn to. They are incredibly valuable additions to your development toolbox. You've probably already got many of them installed.
https://addons.mozilla.org/en-US/firefox/addon/1843
https://addons.mozilla.org/en-US/firefox/addon/60
https://addons.mozilla.org/en-US/firefox/addon/722
https://addons.mozilla.org/en-US/firefox/addon/1146
https://addons.mozilla.org/en-US/firefox/addon/1865
https://addons.mozilla.org/en-US/firefox/addon/5369
https://addons.mozilla.org/en-US/firefox/addon/3036
Labels:
ABP,
Firebug,
Firefox,
Friday,
NoScript,
ScreenGrab,
SEO,
tools,
Web Developer,
YSlow
Subscribe to:
Posts (Atom)