Chris Blackwell's Domain

confessions of a web developer

Archive for the ‘Web Development’ Category

Changing Domains & Taking the SEO Bullet

Monday, May 17th, 2010

For the last few years I have been hosting my personal website and email on the domain ChrisBlackwell.org. I actually ended up moving to that domain from my original longer domain theChrisBlackwell.com. I originally registered that domain because I was obsessed with having to use a .com domain for my website.

After a while I noticed that a lot of people were using .org for their personal websites, and since I could get ChrisBlackwell.org and drop “the” from the domain, I switched over. I never really liked the .org domain. After all, I’m not an organization or a non-profit. It also never really fit how I view the web in the future, as a domain-less area, where what’s in the domain doesn’t really matter.

I decided last month to register a couple of name based domains, meaning domains that specifically target being used for personal websites and vCards. I registered both ChrisBlackwell.me and ChrisBlackwell.name. While the ChrisBlackwell.name domain really specifies that it is meant to be used for personal websites, I don’t really like 4 digit TLDs. After pondering on this for a month, and figuring out what the SEO implications might be, I made the switch and now everything is moved over to ChrisBlackwell.me.

SEO Problems and Why I Don’t Care

The biggest problem with moving your website to a different domain is losing all your links and Google juice that you have spent years building up. Most web developers know we can fix that problem with a single line in a .htaccess file hosted on the old domain:

Redirect 301 / http://new-domain.tld

The much bigger problem I have is with domain age and relevance. My old domain (chrisblackwell.org) has been registered for several years, and in the eyes of Google is a trusted site. My new domain (chrisblackwell.me) has only been registered for a month and a half, and in the eyes of Google, doesn’t have a lot of history. While I’m hoping that having the old domain forward over will carry forward some of that trust, I can’t be certain of that.

The other problem, and this is only in theory, is that Google trusts the main three top level domains the most (.com, .net and .org). All the other domains like .name, .biz, .info, and maybe .me don’t get as much credibility as their higher level counterparts. This is a problem I think needs to go away as soon as possible. The notion that you have to have a top level domain to get good search engine rankings has led people to come up with either ridiculously long domain names, or ridiculously sounding company names.

I’m over it! I don’t care about the SEO implications because I believe this is the right thing to do. This website has never been about making everything 100 percent perfect, or I wouldn’t have built it in HTML5 and CSS3. This website is about testing new waters, being on the leading edge, and finding out how we can all make this a better Internet for everyone.

I’d really like to hear what you think. Did I make the right move, or am I being foolish? Do you trust top level domains more, or do you think they just don’t matter anymore?

Tags: , , , , ,
Posted in Web Development | 2 Comments »

Moving Your WordPress Directory

Wednesday, February 3rd, 2010

I wanted to take back my home directory and decided to move WordPress to it’s own folder. WordPress fully supports this but it is usually easier when you are first installing WordPress, then later on down the road.

The first thing we have to do is login to the WP-Admin area. Go to Settings and under WordPress address put www.domain.com/wordpress/ Leave the Blog address at just www.domain.com Now once you press Save Changes your site will be broken, but don’t worry it’s only temporary. The important thing is that pressing Save Changes sent the change to your mySQL database before your site broke.

The next step is to move all your WordPress files into a subfolder, except for the index.php files and .htaccess. Moving the WordPress files were easy enough, you just create a subfolder in your home directory named wordpress. The directory can actually be named whatever you wish, but for our purposes we will just call it wordpress. Not edit the index.php file in your root directory to have it include the file from your new directory.

Before the change:

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');

After the change:

/** Loads the WordPress Environment and Template */
require('./wordpress/wp-blog-header.php');

Once this is done your site should be backup and running again. The one problem you may notice is that images in your posts may be missing. That is because most of your posts are looking for images from the root /wp-content/uploads/ folder which has been moved. Rather then edit through each and every post to change the path, there is a simply SQL command to run on your WordPress database to fix the problem.


UPDATE wp_posts SET post_content = REPLACE(post_content, 'your-domain.com', 'your-domain.com/wordpress');

There you have it! You’ve successfully moved your WordPress installation to it’s own directory and reclaimed your root directory for easy management. If you had any problems with this or you know of a better solution please leave a reply in the comments.

Tags: , , ,
Posted in Web Development | No Comments »

Converting from XHTML to HTML5

Thursday, July 23rd, 2009

I decided a few weeks ago that I wanted to convert my site from it’s XHTML format to an HTML5 model. This site as of this writing uses the Desk Mess WordPress theme. I wanted to continue to use this theme as I really like the layout and feel, and thought it would be a great benefit to have this converted to HTML5.

I originally planned this to be an HTML5 markup with CSS3 layout properties using the new CSS Tables property. After adding in all the HTML5 markup and then styling using CSS Tables, I decided there was no benefit for the user or from a usability standpoint. In fact, I believe that CSS Tables go against some standard accessibility practices, but I’ll talk about that in another post later. In the end I ended up going with nice and reliable floats.

Semantic Markup

One of the biggest changes of the HTML5 markup was my ability to be able to markup data semantically. Using tags like <header>, <nav>, <aside>, <section> and <article> we can now properly define what areas of our website’s sections are intended for. The website skeleton now has the following structure:

<!doctype html>
<html>
<head>
	<title>Chris Blackwell's Domain</title>
</head>
<body>
	<header>
		<h1>Chris Blackwell's Domain</h1>
	</header>
	<nav>
		<!-- Navigation -->
	</nav>
	<section>
		<article>
			<!-- Blog Post or Static Page -->
			<article>
				<!-- Comments on blog post -->
			</article>
		</article>
	</section>
	<aside>
		<!-- Sidebar -->
	</aside>
	<footer>
		<!-- Footer -->
	</footer>
</body>
</html>

As you can see I have embedded the <article> tags for the comments within the <article> tag for the post. This semantic can tell a computer or search engine that these comments on the page are in reference to the article above and not random text. It gives the comments some context and allows for cross referencing. I could have taken this one step furthur and embedded <header> and <footer> within the <article> tags for the article. I will most likely revisit this in the near future and add in that markup as well. The possibilities for this are endless and I’m really excited to see what search engines or other applications learn to do with this new ability.

I’ve also added in a the <time> property so that I can markup the post date and time as well as the timestamps for the comments.

The <time> property for the post timestamp looks like the following:

<time datetime="<?php the_date('Y-m-d') ?>T<?php the_time('G:i'); ?>-5:00">
       <?php the_time('M j, Y') ?>
</time>

For the comments we just change the PHP functions to call the comment_date and comment_time:

<time datetime="<?php comment_date('Y-m-d') ?>T<?php comment_time('G:i'); ?>-5:00">
       <?php comment_date('M j, Y') ?> at <?php comment_time() ?>
</time>

Changes to H1 tags

Another change I wanted to make was the way headings were represented throughout the site. Your main homepage should have the title marked up in an <h1> tag. However, on your single post pages, the post title should be marked up using an <h1> tag and your blog title can be on a lower hierarchical level. Since the website title tag is called on the header.php file, I needed a way to have to appear as a <h1> if on the home page, but just a <p> if on another page. I did this using a simple php if statement:

<?php
// Choose the blog title code
if ( is_home() ) { ?>
	<h1 class="blogname"><a href="<?php echo get_option('home'); ?>"
		title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
	<p class="slogan"><?php bloginfo('description'); ?></p>
<?php
} else { ?>
	<p class="blogname"><a href="<?php echo get_option('home'); ?>"
		title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></p>
	<p class="slogan"><?php bloginfo('description'); ?></p>
<?php
}
?>

Thank you again to the great guys at Laptop Geek for creating this theme and giving me the chance to modify it. It has truly been a fun and rewarding experience and I release the source back for everyone to download, use, modify and have fun with.

Tags: , , , , ,
Posted in Web Development | 4 Comments »

« | »