Posted: September 16th, 2008 | Author: Mihai Bojin | Filed under: Google, SEO, Search engines | Tags: domain, fast inclusion, Google, htaccess, redirect, SEO, SERP | 1 Comment »
For those who don’t know what redirection is, there are a lot of helpful resources out there; try Wikipedia for example.
Google published a redirection best practices tutorial in April about moving pages around. Let me sum it up in a short list:
- Use 301 redirects; start small with a couple of pages in the begining and after you check that it works go further step by step until you redirect your old domain to the new one.
- Don’t do both a redesign and a full domain redirection at the same time
- Check on site and off site links, changing them accordingly to point to the new domain
- Keep control of your old domain for at least 180 days.
The trick here is to redirect traffic from an older domain to a new one without losing standings on the SERPs and traffic coming to your domain. It is harder than it seems, but not really that hard.
I tried this technique with one of my domains and now I’m sharing the results !
Everybody fears and avoids redirecting domains because of the most probable loss of traffic.
Let me tell you how I did it:
- I had a site with around 2500 unique visitors per week
- I wanted to change it’s domain name so I did a 1 on 1 redirect to the new domain; I did not proceed with caution 1 page at a time, one directory at a time; that’s because I knew what I was doing, the domain name was coded in my configuration script and once I changed it all of the site’s internal links were updated to the new ones.
- I did not move the site to a different server (in my opinion this is demonstrating to Google that you own both domains)
- I even left the site in the same directory on the server and I implemented the 1-1 redirect within the .htaccess file; it’s important to keep the old site registered with Google Analytics and also keep it’s sitemap right where it were; because I had the same directory for both old and new domains I had to create some custom htaccess rules:
- I didn’t contact the sites that had outbound links to the old domain; I just left them as is, mainly because they were not high quality links and partly because I was lazy
# Old files that need be kept on the domain
#Google webmaster tools verification file
RewriteCond %{REQUEST_URI} ^/googlea000011112222.html$ [OR]
#Sitemap file
RewriteCond %{REQUEST_URI} ^/smap.xml.gz$ [OR]
#Sitemap index file
RewriteCond %{REQUEST_URI} ^/smap_complete_idx.xml$
#Any other files that you want kept accesible on the old domain (without redirecting them) you will have to place
#above in a RewriteCond line ending with an [OR]
#Serve the requested URL on the old domain
RewriteRule (.*) $1 [L]
#www to non-www redirects and old to new domain redirect
#I wanted to use the non-www form for the new domain so I redirected all other forms to example-new.com
RewriteCond %{HTTP_HOST} ^www.example.com [OR]
RewriteCond %{HTTP_HOST} ^example.com [OR]
RewriteCond %{HTTP_HOST} ^www.example-new.com
RewriteRule (.*) http://example-new.com/$1 [R=301,L]
- The old domain was indexed in Google for about 9 months; the new one was bough one day prior to the redirect, so it was virgin: no links to it, no Google history etc
Okay, now come the facts:
- The old domain had around 2500 uniques per week (measured one week before the change) with 10,000 page views
- I pulled the redirection hard, not doing baby steps but Titanic sailing in Googly waters
- After around 4 hours of the initial redirection and listing of the new domain sitemap in Google Webmaster Tools, the site appears in Google results with around 500pages indexed. I was shocked ! It took 4 hours to add this new virgin domain to Google
- 6 weeks later, the new domain pulls in 2000-2100 unique visitors with 6000 page views per week
- In the meantime I lost control of the old domain, so that’s another thing on Google’s list I haven’t respected; right now there is only the new domain online
- In these 6 weeks, GoogleBot visited the new domain through redirects and added pages from the new site at an incredible rate; after this small timespam the new domain has around 40k pages indexed, while the old domain even if it doesn’t work anymore still retains 30k pages (it had around 70k before the redirection and Google was dropping around 2500pages per week but now it stopped dropping)
- I also have to note that after the first three weeks Google had in it’s index around 30k pages indexed for each domain
So what can we learn from this ?
- A full domain to domain redirection has costed me around 20% of the traffic which is neither little or big
- If you can be sure that the internal links are updated when you redirect, you can start redirecting all at once
- If you want to get a new domain indexed in Google, get an older one and redirect all traffic from it to valid pages on the new domain! It took 4 hours to get my new domain listed in Google!
- I guess that if you have enough traffic on a group of pages, you can pull this fast Google inclusion trick by only redirecting a part of an existing domain (maybe even for a small time). I wasn’t able to test this because I lost control of the old domain, but will test it with the next opportunity
- Also this seems a method of splitting the traffic from one domain into 2 domains. Because Google doesn’t delete a page from the old domain immediately after indexing it on the new domain, you could get away with more summed up total traffic on both domains; I will test this whenever I’ll get a chance
Finishing up, I am really curios of the new domains PageRank at the next TBPR update. I will post the findings. Be sure to check back.
If you have any information that you’re willing to share on this subject, please comment on this post !
Posted: September 15th, 2008 | Author: Mihai Bojin | Filed under: PHP, Web | Tags: form, form generator, PHP, simple, SimpleForm | No Comments »
I’ve been meaning to do something like this for a long time.
I think I can safely say that forms are a web coder’s worst nightmare. Everytime you think you covered all the aspects of a project you realize that you forgot something about the website’s forms.
You can’t really standardize forms because they come in a lot of shapes and colors. The best implementation I know of is Zend_Form, but it implies that you use the whole Zend Framework and that brings a lot of overhead to the table.
If you have a small website, or you are in need of a simple lightweight form system, stay tuned !
Another reason for developing this generator is a problem faced by a good friend of mine, who’s a marketer and PPC specialist.
He told me how he searched the web for a simple to use, form tutorial for a non-programmer like himself. He wasn’t able to find one but he wanted to do it himself, so he struggled for a week and created… something. Something that works but that won’t help him at his next project.
I guess there are a lot of guys out there in the same position, so I’m starting this series for the web professionals and passionates that need a simple to use Form Generator. Later on in the series I will address the seasoned web coder that maybe wants to help develop this FormGenerator into a complete form management solution.
I’ve created the first simple version of the FormGenerator and as you might have guessed it’s called SimpleForm.
It’s small, lightweight, secure and it can send the form results after completion to one or more email addresses or your liking.
All you have to do to make it work in your scripts is to create a configuration file like the one below. In it you’ll find all the features of the form explained. You can also download the full project files from www.MihaiBojin.com/wp-content/uploads/SimpleForm/SimpleForm-v1.00.zip
SimpleForm.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| < ?php
require_once('SimpleForm.php');
/**
* Initialize SimpleForm with parameters
* Syntax: SimpleForm($formName, $method)
* $formName - You only have to fill this in if you have more than 1 form on the page
* $method - Form's method: default is 'post', you can also use 'get', but it's not recommended
*/
$form = new SimpleForm('mihai', 'post');
/**
* Adds an element to the form
* Syntax: addElement($label, $type, $required, $errorMessage)
* $label - Label that represents the element
* $type - Type of element; right now only input-text, input-password, textarea and input-submit
* are implemented
* $required - Determines if field completion is required; if true you will have to set $errorMessage
* $errorMessage - Error message to show in case field is not filled in
*/
$form->addElement('Name', 'input-text', true, 'Please complete the name field!');
$form->addElement('Email', 'input-text', true, 'Please complete the email field!');
$form->addElement('Subject', 'textarea');
$form->addElement('Send', 'input-submit');
/**
* If you want to show a success message after the form is shown, set it through this method
* Syntax: addSuccessMessage($message)
* $message - Message that you want shown after the form is completed
*/
$form->addSuccessMessage('Congratulations! You will be contacted as soon as possible!');
/**
* Runs the form generator
* At first it will just show the form
* If the users submits the form with the required fields uncompleted, it will reshow the form plus the error message(s)
* If everything is okay, it will just show the success message (if filled in) or nothing
* Syntax: runForm($returnValues)
* $returnValues - default is false; if set to true you'll have to capture the output from the return value
* like $output = $form->runForm(true); and echo it yourself
*/
$form->runForm(false);
/**
* If you need to send an email (or emails) with the form's content, do it with this method
* Syntax: mailTo($to, $from, $subject)
* $to - can be a form element(for example 'Email') in which case it will use the value entered by the user
* or a plain email address
* $from - can be a form element(for example 'Email') in which case it will use the value entered by the user
* or a plain email address
* $subject - Email's subject message
*/
$form->mailTo('office@example.com', 'Email', 'Contact form email' ); |
The example configuration file sets up a simple contact form with Name, Email and Address fields.
To show the form in a web page, just include this init file (SimpleForm.init.php) in your webpage. For example I added an index.php that shows how to include the form generator:
index.php
1
2
3
4
5
6
| < ?php
/**
* Simple way of including the form in your website
*/
require_once( 'SimpleForm.init.php' );
?> |
As you can see, you just have to call the require_once feature of PHP and the generator will do it’s magic.
Some implementation details:
- the generator is implemented in PHP 5 it will not work on any subversion of PHP 4
- if you don’t use PHP on your website for anything else, you’ll have to rename the target filename from "filename.html" to "filename.php" and just include the php tags from the index.php example above
- I tested the script and it seems to work but that may not be the case on other servers, versions of PHP etc; if you run into any problems, drop me a comment or an email and I will help you sort things out
Have fun with it and please share your experience with SimpleForm version 1.00 !
Posted: September 12th, 2008 | Author: Mihai Bojin | Filed under: Tools, Web | Tags: backup, collaboration, file sharing, file versioning, FolderShare, getdropbox, Mac, MobileMe, synchronization, Windows | 1 Comment »
For those of you who weren’t searching for a www.GetDropBox.com solution, it’s because you weren’t aware something this cool exists…
It’s a file sharing solution, that resembles a backup system or for the programmer world, a versioning system like Subversion or CVS.
For some time now, getDropBox.com was in closed beta, but now that’s over and anyone can join in and start using it.
Here are the main benefits of using DropBox:
- 2GB free storage
- Synchronization of files between many computers (including Macs :D); the system works as a background process and notifies you when new files were added, changed or deleted; do you use FTP to share files between home & work? This is better !
- File versioning (you will be able to see more versions of the same file); great for documents and source code; did you ever change something in a document and forgot what it was?You can recover from these kinds of mistakes;
- Collaboration (you can share the same account login with one or more persons and keep your files updated)
- Ability to generate a web link of any file and send it to someone on the web; did you ever have problems with sending files to friends from IM (instant messaging) clients?
- The possiblity of accesing your files remotely from a web-browser
If you don’t believe me, at least give it a shot ! It’s fast to install, easy to configure and a pleasure to use:
www.getdropbox.com/ and download the client for Windows or Mac
or
www.getdropbox.com/login to create a new account and enter the promotional code "lunch" that enters you in a prize draw of free premium accounts after the service leaves beta.
There are 2 other services I know of that can do similar things, but DropBox is better at file sharing. I’m talking about Microsoft’s FolderShare which is slower in updating files (and you’ll feel it in your OS) and Apple’s MobileMe which is a premium service of around $70/year, doesn’t have versioning but has other features like contact sharing.
If you’ll use it, share your experience with DropBox or similar services that you know of through comments !