How To Rename A Web Page

I renamed my Free Resources page, which is the #3 most popular page on my site, to Printable Bingo Cards, which both more accurately describes what is available there and is a much better title for SEO purposes.  This required some slicing and dicing in all of my HTML files because that is a link which appears in my navigation bar.  Luckily, bash was adequate for the task as always.

for htmlFile in *.htm
  sed s/free_resources\.htm/printable-bingo-cards.htm/ $htmlFile > temp1.txt
  sed “s/Free Resources/Printable Bingo Cards/” temp1.txt > temp2.txt
  mv temp2.txt $htmlFile
  rm -rf temp?.txt

I also redid the title tag (“Free Resources from Bingo Card Creator” to “Printable Bingo Cards from Bingo Card Creator”), updated the site map with the new URL, and added a RewriteRule for the old URL to my .htaccess so that I don’t break any links from the blogs and schools who linked to it.  This is a fairly key step for any change you make that affects a popular page.  If you do not do it, not only are you hurting user experience on third party sites which trusted you with a link, you’re squandering PageRank that you’ve worked so hard to gain.  Adding in another rewrite rule takes like 5 seconds, so do it!

## put me somewhere near the top

RewriteEngine on

## put me in the big block of rename rules you’ll be creating

RewriteRule ^thanks-for-downloading\.htm$ [R=301,L]

printable-bingo-cards.htm is, by the way, pushing it on how many words I would suggest you have in a filename.  I’m fairly sure that is under the threshold to get penalized because one or two of my competitors use three word filenames, sometimes after having the same three words in a directory listing.  That is a bridge too far in my book, and I expect Google will smackify it sometime soon.  Repetition in the URL gives no useful information to human users, and it is not a “natural” design technique for a website either, so I suspect that Google will eventually toss it out as a useless SEO technique, the same way they habitually ignore overly-long-file-names-stuffed-with-keywords-like-this-one.htm .

Finally, don’t forget to resubmit your updated sitemap to Google.

Explore posts in the same categories: SEO

3 Comments on “How To Rename A Web Page”

  1. Baruch Says:

    Just a small shell comment, if you use GNU sed you can do it as:
    sed -i -e ‘s/…/,,,/’ -e ‘s/lll/kkk/’ filename

    -i means in place
    and you can have multiple expressions in the command line with -e.

    Ofcourse, your method will work just as fine 🙂

  2. Patrick Says:

    Thanks, you learn something new every day.

  3. Selvam Says:

    Can anyone guide me i want to change the WP page name only in script not in navigation….

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: