Basic On-Page Search Engine Optimization for Web Developers

October 26, 2015

Search Engine Optimization (SEO) is another discipline of the web — albeit one not exactly relevant to design or development. More broadly, SEO is “web marketing.” More narrowly, however, for your purposes as a web developer — SEO is simply the process of making your website more understandable to search engines. Even if you do not plan to be a web marketer, when you build a site you should usually adhere to basic SEO standards.

This information is primarily relevant to on-page SEO. There’s such a thing as off-page SEO, too, where you focus on gaining links to your website — but that’s a different beast altogether, and something you generally don’t do as a web developer anyway.

The Short of SEO

Most of this should be done anyway for reasons beyond SEO, too. For example: a clean URL is more understandable to humans and can help with comprehension and navigation of your site; redirecting old/broken URLs helps humans who may follow an outdated link. It’s also all stuff a CMS like WordPress can do automatically (or with a plugin or two).

You can optimize further and actually go really deep down the rabbit hole as far as SEO goes, but the above is the bare minimum. This is the short of SEO where it relates to web development. There’s a lot to SEO that doesn’t directly relate to web development, again — there’s a lot of marketing, too.

Search Optimization


Your site should have two sitemaps, both a HTML file (for human visitors) and an XML sitemap (for search engine submission). The HTML file helps your human visitors navigate your site; the XML file helps search engine robots crawl your site and discover its pages.

Titles and Meta Descriptions

It’s important to use unique, descriptive title and meta description tags on each page because both of these elements show in search engine results. Creating well-optimized meta and title tags helps search engines know what your page is about. Creating enticing, well-written titles and descriptions also encourages visitors to click on your site when it’s in the search results.

As a developer, you might not be in charge of writing titles and descriptions — but it is important to ensure these things can be easily updated and made unique for each page. On WordPress, there are a number of options — All In One, Yoast, and SEO Ultimate — each of which offers slightly different features and performance.

Clean Code

Valid, Clean HTML

Clean HTML code helps search engines understand your site, again. It’s also great for human visitors in that it more likely guarantees standardized appearance of your site across different browsers and devices.

Valid HTML is also important — although note that some things like scripts and similar can make your HTML fail to validate. That kind of validation fail usually isn’t a problem, but do avoid broken HTML tags and other severe issues.


Although you may not create content regularly as a web developer, it happens often enough that you’ll want to know these two basic aspects of content SEO.

Header Tags

Proper and structurally logical use of header tags (h1, h2, h2) is important. Headers add structure to your document and help both human visitors and search engines understand what your page is about. While you may not write the header tags, make sure your CSS supports them.

ALT Tags on Images

ALT tags on images are important for two reasons. Firstly, your website may receive visits from blind users navigating the web with a screen reader. Even though a blind person can’t see your image, describing the image accurately for them in the ALT tag still provides some of the image’s benefit.

Secondly, ALT tags on images can help your images rank better in web searches. Most search engines that provide an image search also provide a way to visit the page where that image appears. You can get a surprisingly amount of traffic in this way.

Clean Site Structure

Create a sensible website structure, including:

Page Content Optimization

Make sure each page is dedicated to one subject (e.g., it’s better to separate every product onto its own page, rather than listing all products on a single page). Avoid duplicate content (e.g., having two pages with the exact same content).

URL and Site Structure

Make sure your URL structure is clean (e.g., instead of messy (e.g., or This is good for human visitors of your site, who can better understand what they’re looking at when they look at the URL, and good for search engines for the same reason.

It’s also important to make sure your site structure is clean, with sensible structuring. If you have a lot of pages, putting related pages under one parent page can help.


Redirect any old URLs, if applicable. This is important if pages are already indexed on search engines. Using a 301 Redirect tells the search engine to look at your new page, passing the value of the old page onto your new page. It’s important to 301 Redirect only when it’s sensible — e.g., don’t redirect a page dedicated to one thing to a new, random page on the new site. This can be confusing for human visitors, and may actually harm you in search engines.

Spam Prevention

If your site allows comments or has forums or any other area where users can post, make sure you have a way of preventing spam. Having a website littered with spammy links is a surefire way to destroy that site’s reputation. Also ensure any links posted to forums and comments are “nofollow” links.

Speedy Site

Site speed is a factor in SEO — make sure your site doesn’t crawl on the first load (use Firefox Private Browsing or Chrome Incognito to ensure you’re not cached) is especially important. Even if your site seems fast to you, that might be because you’re working off of cached materials in your browser.

Beyond SEO, ensuring your site loads quickly is important for human visitors, too. People leave a website when it doesn’t load quickly. How many times have you searched something, clicked on a result, and left when the page stayed blank more than a second or two? Why should you wait, anyway, when there are probably twenty-five other sites in that search result you can get the answer from? That’s exactly why you should ensure your site loads very quickly.

SEO Tools

These are tools you can use to help you optimize. Google Webmaster Tools, for example, reports bad meta descriptions and titles. Google Analytics can help you figure out where your visitors are coming from and how to get more of them.

These tools are generally useful beyond SEO, too. Google Webmaster Tools can alert you to a hack. Analytics data is great to have long-term even if you’re not doing anything with it right now.


When researching SEO, avoid:

  • Anything older than about six months to a year. Search engines change their algorithms (their method of sorting search results and deciding who goes on the first page) frequently to avoid black-hat (bad) SEO techniques as well as to provide better search results to users.
  • Anything advocating keyword-stuffing, directory submissions, writing your content for search engines instead of people, buying links or blog posts, spam, buying e-mail lists, etc.

SEO is legitimate — but there’s also a lot of shadiness, too. Tread carefully. Moz is a good place to start, if you’re interested in learning more.