What happens to your old pages when you create a new website?

I’m not here to teach, but I wrote this for a web marketing blog at work that never went live. Didn’t want it to go to waste.

Thinking about a website upgrade? Is it on a new system with all new pages? Is anyone thinking about the links to the old pages? You’ll want to make sure you can identify and redirect the most important ones for the sake of your users and your Google rankings.

There will be various ways to get this list depending on your setup, but one good way is to get a report from your analytics tool (Google Analytics is a popular example). Most tools can provide a list of the most commonly visited URLs over a certain date range. Set that range to a year or so and you’ll have a hefty list of your most important pages. Next you’ll want to use your analytics software’s export feature (most will have this capability) to save the list into a text or excel format. If you don’t see an Excel specific format, look for an export format called Comma Separated Values (CSV)  which can be opened by Excel.

While your website may have had many more working links, discovering them and redirecting them to appropriate pages on the new site will offer diminishing returns due to their light use.

Now that you’ve got the list of URLs you want to keep alive, you’ll want to identify the best matches for them on the new site. The matches don’t have to be exact. For instance, we redirected all our old individual calendar events and news items to our new “News and Events” page. That said, avoid redirecting the entire list to the homepage of your new site if you can. This isn’t helpful for users and Google even explicitly recommends against this in the great video on this page about 301 and 302 redirects. That page even includes some links on how to actually code these changes on your web server.

If you have questions about any of the specifics just post in the comments!

posting a form to two places at once

I’ve spent a lot of time at work lately struggling with how to send a form submission to two different places at once.

I started just using the jQuery get method. Why not, right? That’s all I wanted to do, was make a one way request to a remote server. It worked fine as expected and I moved onto another project.

Unfortunately, I’m spoiled by jQuery’s usual similarity across the various browsers, and I didn’t test for the data going through in any other browsers. It turns out that while Chrome’s behavior is according to spec, it’s still not something the other browsers permit.

After some research, I added $.getJSON, which still wouldn’t work unless you add ?callback into the target url.

The wikipedia page for jsonp explains how it’s done on the backend best. Basically, it dynamically adds a script tag with “src=” set to the remote server and the data you want to send in the query string.

Then we ran into another weird problem. It would work in Firefox while debugging, but not in practice. Which means Firefox was executing the post command in the form before letting the jQuery finish the getJSON command. Since we needed to pop up an alert for the user anyway, I just added that after getJSON and it worked flawlessly. But in other scenarios there’s still the open question, what’s the best way to give it enough time to finish?

p.s.
Using JSONP to send and receive any kind of sensitive data is dangerous as any malicious site could make the same request.

p.s.s
I wonder if there isn’t some simpler way to do this but the alternatives sound just as messy. i.e. dynamically opening an iframe with display set to none.

Comments Were Not Working

Comments weren’t working on this blog for some reason.

Problem

When trying to post you’d be redirected to the post’s URL followed by /comment-page/#comment-. But, it should look more like this /comment-page-1/#comment-74. I’d also get an email about a new comment, but all the normal fields would be blank, i.e. Author, Email, URL, WHOIS, and Comment.

Testing:

Googling the problem I found this issue is usually caused by bad permalink structures. So I made sure the htaccess file is writable and only contains the automatically generated wordpress lines. I even temporarily removed my root folder htaccess file for a minute but that didn’t fix the comments (though it did have all the folders display indexes, 1990s style.)

Since I do use a custom link structure (/%year%/%postname%/) I turned it off and still had the same problem. With it off I got this URL:
http://www.robertpate.net/blog/?p=200#comment-

And that URL did not 404! But there was still no new comment. Looking at it I realized that the comment should have an ID on the end, but didn’t. So it wasn’t a permalinks problem, it was a “comments aren’t getting saved to the database” problem.

I updated all the wordpress files and switched to the new theme, just in case. But since that didn’t solve anything I logged into cPanel and was able to run a check and repair on the database. It threw some nasty errors, and then the repair fixed them all in the span of about 60 seconds.

Today I Learned: 1. Databases can trip and hurt themselves. 2. Timeout errors while uploading via FTP may be due to being on a virtual machine.

SEO Testing Update

Still ranked 6. Google has picked up my new blog title and my previous post. The current list looks like this: RP’s (robert pate’s) on the White Pages, an RP on linkedIn, an RP on Facebook, the RP wikipedia entry, the RP Cal State page (cstv), and then me. If you’re testing your own stuff don’t forget to clear your cookies or just open a private browser session. Google will customize your results otherwise.

Next question: Should I 301 or 302 from robertpate.net to robertpate.net/blog? hanselman.com uses a 301, but I haven’t run across a lot of other blogs doing the same. Currently I’m using a 302.

I think I’ll test that next. While I worry that doing a 301 redirect may make my root domain less potent if I ever added content there, I will do it anyway, for science!

Comparison of Free Software Licenses to Creative Commons

Back when I was dabbling in writing, I familiarized myself with the various Creative Commons Licenses. Now as a programmer I’m familiarizing myself with the various Free Software Licenses.

Unfortunately, the official list is worthless to someone who doesn’t already understand the differences between the basic types. In googling the issue, I found a few helpful resources: a “quick ref license chooser” which is a great idea but didn’t help this noob a whole lot, and this video from redhat entitled “Open source software licenses explained.” The video was the biggest help and is worth the 6 minutes it takes to watch.

But what I really wanted was something as simple as creative commons. But I couldn’t find one so I drew up this comparison. The licenses are obviously *not* the same. Nor are they compatible in many cases. This is only a loose comparison. But I’m hoping that this should still increase understanding for those coming from FSF to CC or vica versa.

  1. Attribution-Only – “permissive / non-protective” licenses, i.e. FreeBSD
  2. Attribution-ShareAlike – “copyleft / protective” licenses, i.e. GPL
  3. Attribution-NoDerivs – Here you would keep the source proprietary, but distribute the installer as freeware.

Each of these CC licenses also has a NonCommerical variant that prevents commercial use, but I couldn’t find a parallel to it in free software licenses. Why that is could probably be a whole separate blog post.

For further reading, check out this David Wheeler post on why you should use GPL for your software, the BSD licenses Wikipedia entry, the GNU instructions on how to include GPL in your project, and CC faq entry for why you can’t use a creative commons license on software.

SEO for This Blog and Domain

I’ve moved my blog around a lot over the years. I did this again recently because I realized I was getting 9th place in search results for my name. As a web admin I should be ranking higher simply because I know how to setup a site for good SEO.

So I decided to fix my site up and at the same time test a lot of the best practices.

Since i’m targeting Robert Pate as keywords, i changed the title of my blog from robertpateii to Robert Pate II. I’m not sure how google treats spaces, but I figured an exact match would be better than a psuedo match. I moved back to robertpate.net instead of robertpateii.com for the same reason.

Also .net made more sense to me, subjectively. I’m not a commercial enterprise. I’m not a networking company either, but at least it’s the right industry for me.

I also made sure I was redirecting everything to www so that there isn’t any duplicate content. Redirected all the old urls from when the blog was on robertpateii.com, and finally updated wordpress manually.

Oh and I posted this so that there’s some fresh content. In a week or two i’ll update this with my new google rank.

June 11th, 2011 Update:
6 days later and i’m now ranked 6 for Robert Pate, but google hasn’t picked up my new blog title yet. The ones in front of me are whitepages, linkedin, wikipedia, cstv.com, and justia.com. That’s not bad for having little content and no one linking to this site. There are 2 obvious next steps: go through all my online spaces and link to my own domain and adding useful content.

July 8th, 2011 Update:
See the SEO Update Post.

Hello Dolly Plugin with Dance Commander Lyrics

Do you use wordpress too? Are you more interested in awesome than in hope?

Then take my Dance Commander Plugin, which replaces the “Hello, Dolly” lyrics with all the lyrics from “Dance Commander” by Electric Six.

This is not just a plugin, it symbolizes the awesomeness and enthusiasm of an entire generation summed up in six words sung most famously by Dick Valentine: You Must Obey the Dance Commander. When activated you will randomly see a lyric from “Dance Commander” in the upper middle of your admin screen on every page. It can be active at the same time as the original Hello Dolly plugin.

Update on January 14th, 2011: I’ve uploaded a new copy of this plugin that changes the styling back to the original settings. This means you cannot have both on at the same time, but I think it looks better. Here: Dance Commander Plugin – Original Styling

Time Warner, Google TV, and the Internets

You probably didn’t see or don’t even remember the little tiff in august that Time Warner had with ESPN/ABC and Disney.

Or the one in december 2009 with FOX.

That’s nice that they kissed and made up, but it’s probably for the last time. The whole model should be, will be, shifting as the internet gets faster and the cable networks wise up.

TWC is just a middle man when it comes to television content. And in this age of internets, middle men are going out the window. Consumers and producers both benefit from direct exchanges, but these direct exchanges are traditionally inconvenient to arrange for both sides. Thus the need for dedicated middle men. The internet opens up distribution by making these exchanges easy to find and execute.

Time Warner, Google TV should scare you. Because now online options like Amazon Video on Demand, iTunes show rentals, streaming netfilx, and hulu.com will all suddenly be available on your TV.

TWC should get ahead of the curve and focus on making their internet faster and cheaper. Let the companies that actually produce the content sell it directly over the internet to the consumer. They’ll have to do this in order to get ahead of google, verizon, and ATT fiber networks and even the growing 4G services (i.e. Clear, Sprint, and now T-Mobile kind of ). Otherwise in 10 years Time Warner will find itself with a shrinking percentage of the ISP market and a dying cable television model.

Unless . . . the internet doesn’t get faster. If you dig into the ESPN/Disney agreement, they say “Subscribers will also have unprecedented digital access to online content and expanded Video On Demand services.” But that digital access is now being “authenticated.”[1] It appears free, but you’re really paying it with your cable fees. And if net neutrality gets destroyed, these authenticated services will run fast while all the other competing online options will run slow. That’s why the cable companies, the middle men, are so hot for bringing down net neutrality.

I’m hoping Google TV works with all of these services – both free and authenticated. I’m sure Apple won’t play nice since they’re working on a competing product, but that’s Apple for you. As long as we get a market place for video that’s open and competitive with multiple providers, the consumers win.


1. Access to a new authenticated service, which will give Time Warner Cable and Bright House Networks subscribers the opportunity to watch the linear networks ESPN, ESPN2 and ESPNU through their broadband services as well as mobile Internet devices, like an iPad. Details on the launch will be forthcoming.

Multilingual Dialogue on the Web

I’ve been working on a user forum for my company. The solution we’re using has built in translations of the interface, but the translation of the user-generated content is necessarily a completely separate project.

I haven’t seen many other sites translate it either. Judging from the forums I’ve used, it’s because this tech is beyond the current scope of most forums’ capabilities. But happily there are a few neat things being done these days, such as Ted Talks allowing open translation of their talks and Meedan enabling multi-lingual dialogue.

The Meedan article is especially interesting. They use automatic machine translation on every comment, and allow open editing by translators. It’s my hope that this kind of crowd sourcing and  good machine translation can out-pace the compartmentalization of the internet caused by language barriers.

Such implementations are not free or easy to implement, even if you’re leveraging the crowd. But English is not going to remain the common language of the internet forever. Does the possibility of three or four different internets worry you? Have you seen other websites out there handling this well? I bet that someone, somewhere, is hard at work on an open-source project to solve this problem.

Do Androids Dream of Electric Sheep

Enjoyed the movie but loved the book.  It carries a lot more depth, asks a lot more moral questions of the reader, and develops the plot in a completely different manner and direction.

While I don’t think Deckard’s version of the earth will ever come to pass,  it’s still a relevant book for all the questions it asks the reader about what defines a person/soul.

It’s also funny to see science fiction age, i.e. Deckard reading smudged carbon copies in a hover car, and using a pay video phone because no one has mobile phones.