
What every Web Developer should know about SEO - tosbourn
https://www.polemicdigital.com/2015/01/every-web-developer-know-seo/
======
mootothemax
For JavaScript-heavy sites, I still recommend following Google's AJAX-crawling
guidelines, and supporting the pre-rendered view request variable
_escaped_fragment_

[https://developers.google.com/webmasters/ajax-
crawling/docs/...](https://developers.google.com/webmasters/ajax-
crawling/docs/specification)

You can do a good enough job by sending such requests to a PhantomJS instance,
waiting for the page to load, outputting the PhantomJS-rendered HTML to the
browser, and saving the HTML to a cache for faster access next time.[1]

There are also plenty of SaaS apps that will handle the pre-rendering for you.

An additional bonus of doing this is that you can intercept requests from
engines and services that don't support _escaped_fragment (e.g. Facebook
external hit), and always ensure that you serve pre-rendered HTML to them.
(e.g. by matching on the user-agent string).

[1a] One potential hitch is knowing _when_ a page has finished rendering. You
could potentially set a variable in your code and have PhantomJS wait for
that.

[1b] One other hitch is that it's possible for PhantomJS to time out e.g.
waiting for an external JS library to load. It's sensible to check that your
HTML output looks vaguely sane before sending to the browser (e.g. for
Angular, make sure there are no {{ }} blocks in the HTML), and sending a
temporary error code if something looks odd.

~~~
gildas
Another additional bonus of doing that is that you can serve "true" 404 pages
(i.e. not soft 404) for invalid URLs when the page is requested with the
_escaped_fragment_= query parameter.

~~~
mootothemax
_Another additional bonus of doing is that you can serve "true" 404 pages
(i.e. not soft 404) for invalid URLs when the page is requested with the
_escaped_fragment_= query parameter._

For one of our sites, the Angular router redirects the user to a "true" 404
page if the in-app page cannot be found, along with the troublesome URL.

For example:

[https://example.com/products/name-does-not-
exist/](https://example.com/products/name-does-not-exist/)

Will do a JS redirect to:

[https://example.com/not-found/?url=/products/name-does-
not-e...](https://example.com/not-found/?url=/products/name-does-not-exist/)

The /not-found/ URL serves a "true" 404 response.

We're still in early days, and have very little data to back up the pros or
cons of doing it this way.

All I can say with any certainty is that for the several months now we have
zero "soft" 404s listed in Webmaster Tools.

~~~
gildas
Interesting and good to know! I was actually wondering if a JS redirect would
suffice.

~~~
mootothemax
_Interesting and good to know! I was actually wondering if a JS redirect would
suffice._

Hehe, as I say, take it with a grain of salt, as I have very little real data
to back it up with :)

------
alphadevx
I'm coming to the conclusion that SEO does not matter anymore, at least not
this basic stuff as everyone is doing this, including your rivals, so it is
really not going to get you to stand out from the crowd.

Search engines make their money from advertising your site, _not_ from sending
you free traffic via SEO. So fire up your credit card and buy some Adwords in
key search terms for your business, that's want they want from you. I believe
we are already in the post-SEO age of the Internet, maybe we have been for a
few years now.

~~~
roneesh
If you're in the app/startup world, it can seem that way. However I'm a web
developer on Sears's e-commerce team. We focus a lot on SEO still, as the
other options is paying money for search placement and traffic, and those
payments are no joke. We have major business goals around minimizing the
amounts we pay for traffic, so optimizing SEO is big for us.

~~~
b1twise
This is o true. We get a lot more sales from organic Google search results
than paid advertising. It's no joke when you start spending thousands of
dollars a day on adwords and still get nowhere near the organic results.

------
josefresco
Some additional info...

1\. Don't let the new HTML5 tags distract or confuse you. Google knows how to
deal with traditional DIVs so only use the new tags (example: SECTION, ASIDE)
if you know how to properly implement.

2\. Maintainability is a big one for page speed optimizations. You can easily
get 95% there but that remaining 5% often comes at the expense of maintenance,
and the ability to see/make changes easily.

3\. Can't agree more with the section on redirects. 301's are often forgotten
and can cause issues down the road with SEO and site functions.

4\. The last tip I would add would be to monitor 404/access logs. Often times
they will reveal SEO problems.

~~~
mootothemax
_Maintainability is a big one for page speed optimizations. You can easily get
95% there but that remaining 5% often comes at the expense of maintenance, and
the ability to see /make changes easily._

Agreed. You might be able to gain a percentage point by inlining some vital
CSS rules, but without hellish attention to details, that way madness lies.

~~~
butler14
Absolutely - it's also a complete waste of time from and SEO perspective, and
represents a poor cost vs. benefit if your goal is to reduce bounce rate /
increase conversion rate.

------
ssharp
There is some good technical execution advice here, but the basic premonition
is wrong:

"From a development point of view SEO is the concern of how well a robot can
read and understand your content. As we will see, a robot being able to read
your content easily is normally a good thing for humans too."

I don't think we need different points of view of what SEO is. SEO is about
getting your page ranked as high as possible for whatever keywords you're
targeting. Technical execution is a tactic that supports that, not a different
view of it.

------
rcarrigan87
If you want to see how Google ranks your site speed and user friendliness
check out google page speed insights. Very handy tool for guidance on what's
slowing down your site.

A constantly updated and properly marked up site map is also good to have.

~~~
josefresco
I have no affiliation but do use GTmetrix quite a bit when optimizing client
websites: [http://gtmetrix.com/](http://gtmetrix.com/)

It works like an aggregator of all the existing speed tools and provides a
nice speed testing resource that is outside my local network.

------
bsimpson
I'm surprised he didn't mention using kebab-case vs snake_case in his URLs
section.

Google recommends kebab-case and will afford a small SEO bump accordingly.

~~~
tosbourn
Author here: Good point, you are indeed correct. I will add it to my list of
additions/corrections.

------
deanclatworthy
This is all basic stuff, but won't affect your rankings that much. Yes,
everyone should have it in place, but doesn't represent the state of SEO.

What you _should_ know about SEO, is that it's all about getting organic links
to your content, and having content that has a semantic connection to the
keywords being searched for.

~~~
BrainInAJar
but then where will the "SEO expert" scumbags make money?

------
EC1
This is also a pretty good set of guidelines by Google to follow:
[http://static.googleusercontent.com/media/www.google.com/en/...](http://static.googleusercontent.com/media/www.google.com/en//webmasters/docs/search-
engine-optimization-starter-guide.pdf)

------
lucisferre
Where is the evidence presented that supports any of these claims? I realize
most of the seem like common sense but as far as I know many are in fact
false. In particular, the argument about semantic markup seems pretty dubious.
Currently, I'm not aware of any search engine that cares about new HTML5
semantic tags.

On that note, is there even even one example of assistive technology that uses
semantic markup? As I understand it ARIA tags are needed for this, semantic
markup is irrelevant since most (all?) assistive technology is outdated as far
as browser technology goes.

------
programminggeek
For basic on page SEO when you are building a site, this is all good and
useful information.

Developers should also know that creating good technical content and open
source projects on your site will over time generate links and attention for
your website. While those links aren't going directly to your product pages,
the long term benefit of those pages linking back to your main company
pages/products will help those pages rank, which makes you money. It's a bit
indirect, but still is worthwhile.

------
mbesto
Does anyone have any real evidence to support higher rankings for an increase
in speed? Like, if I increased my speed from 5s to 4s page loading, I saw X
amount of increase on traffic.

Reason being - all too often I see SEO developers use this as a hook to sell
their services to clients to be able to get into their codebase.

~~~
Polemicist
It's very hard to isolate any single ranking factor and attribute specific
traffic increases to it, but overall what we know about load speed and Google
rankings strongly implies a correlation there.

Moreover, Google has come out and said it's a factor. Not that we can always
trust everything Google says, but in this case it aligns well with their
efforts to optimise crawl efficiency. Faster loading websites means more
efficient crawling, which helps Google.

And if Google recommends something it benefits from itself, it's a safe bet to
assume it actually benefits your website's visibility in Google's search
results as well. Google is, after all, very adept at the carrot & stick
approach to making webmasters do what it wants them to.

------
aakash
This talk makes so much sense.
[https://www.youtube.com/watch?v=X1nNkS4SVRw](https://www.youtube.com/watch?v=X1nNkS4SVRw)

I first thought the article is written on similar lines of sarcasm.

------
bhhaskin
I have never seen additional semantic attributes done in json before. Json-ld
seems kinda neat.

~~~
blacksmith_tb
One handy use of it is inviting Googlebot to find your site search, like so:
[https://developers.google.com/webmasters/richsnippets/siteli...](https://developers.google.com/webmasters/richsnippets/sitelinkssearch)

