
Moving a Website to a New Domain but Keep the Page Rank
Google Page Rank is important to a lot of people, and many base their decisions around it. There is now no excuse to stay with an underperforming or useless domain name if you can move it and keep the rank.
There are many reasons why you might want to move domain names. Two have already been mentioned. Usefulness is a big factor, one that most of the webmasters out there are keen to compete on. Underperforming is something else entirely. Some domain names just work, they do. They are either perfectly descriptive, niche names or you got there before everyone else did. If you have a page that appears high on the SERP, you may put up with bad ones in order to retain the result. Well no longer do you have to.
I have tried this one myself, which is why I’m writing about it now. I moved a site from a .com domain to a .org a little over three months ago. It had a Page Rank of four before the move, and I was a little apprehensive that all my good work would have been for naught. However, the new site is now back at four, right where we started from!
So here is what I did.
Firstly, and obviously I did a 301 redirect on the old domain and pointed it to the new one. Then I pointed the new .org domain to the website directory. Within that directory I created a folder called “com-site.” The name could have been anything but the descriptive title would remind me what it was if I was having a blonde day.
Within the “com-site” directory I created a new .htaccess file in order to tell browsers, and search engines what to do. The code I used was:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.websitename.org/$1
Then I tested from every browser that typing in the old .com address it redirected to the .org one. It may have been overkill, trying each browser, but it’s a habit I got into when first starting out in web design.
Then I pointed the old domain to the “com-site” directory and tested again with each browser. It didn’t work at first, but after a couple of hours it got picked up and started working properly. My patience was tested, as I was ready to take action and undo it all, but luckily I was interrupted by some work, and by the time I went back it was working.
I then updated the sitemap.xml file to reflect the new domain name and deleted the sitemap from Google. I replaced it with a new one and sat back to wait. Approximately three months later, after many days with the Google toolbar, it showed PR4 again. Not trusting the toolbar on its own, I went to Webmaster Central, and lo and behold, I was PR4 again!
I’m sure most of you out there already know this one, but I was so pleased it worked that I just had to share.
Up to the minute breaking news from the world of music, from the editors of Rolling Stone.
I've helped organize a lot of future of journalism conferences this year, and have done some research for a few policy-oriented future of journalism white.
Grab your Revolutionary War garb, Coldplay's “holed up in a dilapidated north London church” working on a new album for release next year. Brian Eno's back, but to avoid being a “huge stadium act” (?), they're going in “a stripped-down, …
You may have a banner form your clients that link to his/her website. A banner ads usually hidden its original URl and change with some url code. This trick is to avoid from people to click or just copy url adress then open in a new browser.
We want visitor click our baner so our clients is know where is their traffic from.
There is a wordpress plugin to redirect url, redirection Plugin: its http://wordpress.org/extend/plugins/redirection/
Redirection is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation.
Or you can use this plugin:
http://wordpress.org/extend/plugins/short-url-plugin/
posted on
on Wednesday, November 25th, 2009 at 11:14 pm
under Wordpress Tutorial
RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a Reply
Name (required)
Mail (will not be published) (required)
Website
Autofilling Wufoo Form Fields & Other Tricks
It’s been a while since I’ve professed my love for Wufoo. Oh, sweet Wufoo. Thy delicious interface makes form building easy, nay, a pleasure. OK, a poet I am not. A solutions wrangler I am.
In creating a form with Wufoo, you get a special URL right on Wufoo.com where your form resides. You can send people there to fill it out, but much more commonly, you embed the forms directly on your site. You have fairly good design control via their theme manager, or complete control via custom CSS. But these embedded forms come in via an iframe, or through provided JavaScript code which also ultimately ends up as an iframe. Thus, markup control you do not have. (although if you want the HTML to do your own processing, the have templates). This is pretty much a good thing. It means your forms will submit to Wufoo properly without giving you the chance to screw anything up, and allows Wufoo to process it properly and give you access to all the other amazing things Wufoo does.
Now let’s say we want to autofill some fields on the form. We don’t have markup control so we can’t adjust values. And since the form in is an iframe, we can’t even access those fields with JavaScript. Fortunately, Wufoo offers a solution. If embedding via the JavaScript embed method (highly recommended), you can pass a defaultValues parameter to automatically prefill fields!
<script type="text/javascript">
var x7x2q5 = new WufooForm();
x7x2q5.initialize({
'userName':'Wufoo-User-Name',
'formHash':'abc1234',
'autoResize':true,
/* Autofill Magic! */
'defaultValues':'field8=PREFILL-VALUE-HERE',
'height':'562',
'ssl':true});
x7x2q5.display();
</script>
Notice the field8 name? Each field has a numbered name like that. You can find out those values by going under the forms “Code” area and clicking the “API information” button:
So to additionally prefill email in this example, you’d use ‘field5=prefill@email.com’. You can prefill multiple fields by separating them with &’s: ‘field5=prefill@email.com&field6=name’.
Use Case Scenarios
Multiple Similar Submissions
For the new Digging Into WordPress book, we have a form for submitting Errata. The form asks for page number, the errata, name and email. We’ve had some folks, very generously, submit lots of lots of little fixes. Every time they submit the form, they need to type our their name and email address, which could be awfully annoying/repetitive.
So in this case, we are going to need to prefill the form with values from the previous submission. This introduces another little issue… How do we get access to just-submitted data in order to use in pre-filling? Wufoo has a full API, but that’s more than we need right now. While editing our form (under “Form Settings”), we can chose to either display text, or Redirect to Web Site. Typically just showing some text is a nice way to show a confirmation, but we’ll be using the Redirect here. The Redirect URL supports templating, meaning that we can put some special code in it to pass data back to our own site.
In the case of the Errata form, we want their name and email to automatically filled out to make an additional submission easier. So after looking up the field ID’s for those things, our redirect URL will look like this:
http://digwp.com/book/errata/?field3={entry:Field3}&field4={entry:Field4}&field5={entry:Field5}
Which results in this after submission:
http://digwp.com/book/errata/?field3=Chris&field4=Coyier&field5=chriscoyier@gmail.com
Now on the Errata page on our own website, we’ll attempt to pull those values from the URL when the page loads:
<?php
function clean($value) {
// If magic quotes not turned on add slashes.
if(!get_magic_quotes_gpc())
// Adds the slashes.
{ $value = addslashes($value); }
// Strip any tags from the value.
$value = strip_tags($value);
// Return the value out of the function.
return $value;
}
$firstName = clean($_GET);
$lastName = clean($_GET);
$email = clean($_GET);
?>
The cleaning function there is just to attempt to prevent malicious stuff being entered into the URL.
Now in our JavaScript embed, we’ll echo out those PHP variables to prefill:
'defaultValues':'field3=<?php echo $firstName; ?>&field4=<?php echo $lastName; ?>&field5=<?php echo $email; ?>',
That should do it! Of course you’ll want to provide some kind of feedback that the form was successful sent, so just check for the presence of one of the variables and spit out a message:
<?php if ($firstName) { ?>
<div style="background: #d7ffd6; border: 5px solid #39c235; -moz-border-radius: 20px; -webkit-border-radius: 20px; padding: 20px; margin: 0 0 25px 0; color: black; text-align: center; font: 18px Georgia, Serif;">
Thank you! We'll take a look and get 'er fixed for the next update.
</div>
<?php } ?>
Passing along (hidden) information
On Are My Sites Up, we have a Wufoo form for support requests. It is much easier for us to dig up information on people’s accounts if we know what their account ID is. But people don’t know what their account ID is. It’s not important. We also have a particular setting that is important to know when doing support requests. So when creating this form in Wufoo, we’ll create two fields for this data, but just by using a CSS Layout Keyword, we can hide those fields from displaying to the user.
But just because they are hidden, doesn’t mean their values don’t submit! We can still autofill them. AMSU is a Ruby on Rails app, and on this particular view I can access this user data, so I just spit it out in the defaultValues param when embedding the form:
'defaultValues':'field6=<%= current_user.id %>&field8=<%= current_user.timeouts_enabled %>',
A little behavioral spying
Wufoo themselves used this technique on their support form. They wanted to know what page of the site users were on when they opened the contact form (it must have been in a popup at the time). They used some PHP look at the URL and insert it into a hidden field on the form. The point was to see if users were coming from the Help area (proving they attempted to search for the problem themselves) or not.
If you wanted to learn where users were coming from when they got to your form, a hidden field where you prefill the HTTP_REFERRER might be cool:
$_SERVER
It’s very spoofable and generally not reliable, but for a little form like this, it will still likely gather some useful information.
Hey ya’ll, quick reminder here: I wrote a book! It’s called Digging Into WordPress and you can get it here.
Déplacement d'un site vers un nouveau domaine mais garder le Page Rank Google Page Rank est important pour beaucoup de gens, et la base de beaucoup de leurs décisions autour d'elle. Il n'ya maintenant aucune excuse pour rester avec un sous-performants ou nom de domaine inutile si vous pouvez le déplacer et à maintenir le rang. Il ya plusieurs raisons pour lesquelles vous pouvez renommer les noms de domaine. Deux ont déjà été mentionnées. L'utilité est un facteur important, celui que la plupart des webmasters là-bas sont désireux de concourir sur. Sous-performant est tout autre chose. Certains noms de domaine de travail juste, ils le font. Ils sont soit parfaitement descriptive, les noms de niche ou vous y êtes arrivé avant tout le monde fait. Si vous avez une page qui semble élevé sur les SERP, vous mai mis en place avec les mauvaises, afin de conserver le résultat. Eh bien non plus le faire vous devez.
I have learned the hard way that it is absolutely critical to own your own domain name when you are blogging using a hosted solution (meaning that your blog is hosted on someone else's server and you don't need to install any blogging software, etc)! Examples of these hosted blogging solutions include TypePad, WordPress.com, and Blogger. With most of these hosted blogs, your blog URL will usually be a subdomain of the main site – like YourBlog.TypePad.com, for example. Let this article help spare you the pain and frustration I went through and serve as a warning that it is critical to get your own domain name for your blog regardless of how serious you are about blogging — and the sooner you do it, the better! Ideally, you should get your domain for your blog before you start to blog at all.
Oftentimes when people start out blogging, they don't expect for it to become something they do regularly or seriously. Yet is also oftentimes becomes the case that when you start to get feedback on your blog and the traffic starts coming in, you get more excited about your blog and start blogging more often, thinking about ways to monetize your blog, and generally get more serious about your blog.
When I started out my blog on How to Blog, I didn't really even intend for anyone to read it. I was mostly using it as a way to learn how to blog and was documenting my own experiences with what I was learning about how to blog for the content. I was using TypePad at the time because, although it wasn't free, it seemed like the easiest way to go (WordPress.com did not exist at the time).
I had no idea that my blog would end up being so helpful to so many people – or that so many people would end up seeing it at all! That inspired me to blog more, and to write for my audience instead of just myself. Sounds fine, right?
The problem came when I decided that I wanted to use WordPress (the one you need to install on your own web server, not WordPress.com) because of all of cool plugins and themes that were available for it. This meant that I needed to move my blog. Now while TypePad did offer a way to export your posts and their comments, and WordPress had a way to import them so that I could easily set up my “new” blog on my own domain the problem was that I didn't want to lose all of the traffic that I was getting, all of the links to my blog that I had received, or my rankings in the search engines. You might find yourself in this situation for other reasons – for example, perhaps you decide you don't want to pay for blogging and decide you want to switch from TypePad.com to WordPress.com. Or maybe you decide you would like to put affiliate links or adsense ads on your blog, which is prohibited on WordPress.com, and would like to switch to TypePad.com or to an installation from WordPress.org on your own server. All of these situations present a problem. And here's why:
It turned out that TypePad did not offer what is known as a “301 Permanent Redirect” (or any kind of redirect at all). And neither do any of the other hosted servers. The implications of this were many. Anyone who clicked one of the many links that other people had placed on their sites to my blog would not land on my current blog. The search engines viewed my current blog as a completely new site with no links in to it and therefore did not rank it well. People who went to my original blog would not find any of the new content that I had written on my “current blog”, and if I kept the original content up for them then the search engines would view my old posts as being duplicate content (also bad) since it was on both my old blog and my current blog.
It essentially means that if you do not use your own domain as your URL, whatever hosted service you start out with ends up holding your site hostage: move it and there will be consequences and suffering.
If I had used one of the many domain names I'd already owned when I created my TypePad blog (or bought a new one), this would never have been an issue. I would have had full control of my content from day 1. And it wouldn't matter if I wanted to switch from one blogging solution to another because anyone looking for my blog would find it exactly where it was before. With domain names costing less than $10 per year, there is no excuse for not having one for your blog. So do yourself a favor and get one! Even if you never end up moving your blog, your site will still look more professional from the start because of the simple fact that you own your own domain. Why settle for being a subdomain on someone else's site when you can have your own unique domain name?