Latest SEO articles:
Coding For SEO: 10 Ways Coding Skills Can Improve SEO Efforts
It’s not necessary to know how to code to be a good SEO.
Coding skills are not a prerequisite for SEO competency, but additional skills always make one more effective.
Here are 10 ways that understanding code can help turn a good SEO into a great one.1. HTML Coding Standards And SEO Go Together
An SEO familiar with HTML understands how a web document should be structured and is alert to the consequences of poor coding practices.
An important building block of a webpage is the HTML elements, which are to a webpage what a foundation, door, floor, and roof are to a house.
Search engines may be unable to properly crawl a web page if HTML elements are used incorrectly.
The official HTML specifications limit what HTML elements are used in the section (location of metadata that only browsers and bots see) and which HTML elements are used in the section (the document itself that users see).
But when you put elements (like or ) inside the section where the metadata is supposed to be, search engines will begin rendering the webpage from the normally hidden section, resulting in the metadata being indexed as part of the content itself. It means that Google will fail to index that webpage the way it’s supposed to be indexed.
That error can happen when a Facebook pixel code is placed in the wrong place within the section of a webpage.
Another example of how a lack of coding knowledge influences SEO is the 400 error response message.
Some SEOs believe a 400 error code is a bad thing because they see that word “error” and instantly think it needs to be fixed because we understand errors as something to be fixed, especially when they’re displayed in Google Search Console as errors.
But an SEO who knows HTML coding standards understands that the 400 error response code only means that the browser REQUEST for a page is in error (because the page does not exist).
In most cases, that’s a good thing, it’s what’s supposed to happen, and there is nothing to fix.
Knowing HTML standards makes a person a better SEO because they have the ability to spot even more problems than an SEO who lacks coding knowledge.
They are also better positioned to dismiss common SEO misinformation that springs from a lack of coding ability.2. Structured Data
Structured data is a markup language, which means the code has rules that govern how it is written.
There are a few different ways to express Schema.org structured data, but Google’s preference, JSON-LD structured data, is arguably the easiest to understand, which makes it easier to troubleshoot.
Like HTML, JSON-LD has rules that govern how it is written, with a nested structure where you have a subject of the structured data (called a Type) and then the attributes of that subject (called a Property).
Understanding JSON-LD structured data is easy, regardless if you know HTML or any other markup language.
The benefits of understanding how to code structured data cannot be overstated.
Correct structured data markup is essential for achieving many of the highly coveted rich results positions at the top of Google’s search engine results pages (a.k.a. SERPs).
Incorrect structured data markup will make that webpage ineligible for rich results.
One can rely on Google’s structured data markup checker to verify if the JSON-LD structured data is valid and if it’s eligible for a rich result.
But just because the tool says the code is valid doesn’t mean it’s eligible for rich results. This is where the ability to analyze JSON-LD comes into play to fix the structured data, so that rich results become an option.
Manual troubleshooting ability is important because Google’s structured data checker tells you when it’s broken and provides a general idea of where it’s broken. Still, it doesn’t tell you how to fix it.
One can rely on plugins, of course. There are benefits to setting something and forgetting about it.
But structured data specifications constantly evolve, and plugins don’t always keep up fast enough. Also, they aren’t always specific enough for every situation.
When ranking high in the search results, it’s generally best to know how to code JSON-LD structured data to obtain the highest advantage over the competition.3. Communicate Better With Clients
Knowing how to code enables a person to simplify an explanation so that a non-coding client can understand the why of a particular problem and the solution.
One cannot explain what they do not understand.
For example, knowing how to code structured data empowers the SEO to explain that not only it is okay to combine structured data, but also explain to explain the benefits of doing so and how to do it.
Knowing how to code allows one to explain that a client only needs to drop in a few lines of code into their WordPress website’s child theme functions.php file to avoid installing a bloated plugin to do the same thing.
Leaving aside that an SEO without coding skills wouldn’t even know about the functions.php file solution, a person who codes and is literate in PHP can understand when it’s better to use a plugin over the coding solution and then explain it to the client.
Knowing how to code confers the ability to look at the HTML code and zero in on why the site isn’t indexed adequately or is performing poorly.
I once audited an ecommerce site that used a custom-made template and (poorly) featured a crazy level of incompetent coding. Just fixing those codes sitewide enabled the site to have its content indexed accurately.
Knowing HTML allowed me to catch the errors and then explain to the client why it was broken and how they could fix it.4. .htaccess Knowledge Is Power
.htaccess is (in my opinion) a tricky language to learn but reasonably easy to understand how to use it.
Simply learning about the benefits of .htaccess and what it’s useful for, and then how to add it to a file can generally take a person far.
For example, you can use a plugin to redirect HTTP to HTTPS, a plugin to redirect specific pages that changed, and a plugin to fix broken URLs to the correct URL.
But all that can be accomplished with a .htaccess file.
Taking the time to educate oneself on .htaccess can help understand how to improve a website without resorting to another plugin.
A .htaccess file can also be used to prevent other sites from linking to your images and other media files (hotlinking).
The use of a .htaccess file can even be used to stop rogue bots from copying your content by blocking the IP address ranges of bad bots that repeatedly access a website.
Doing something like that with a .htaccess file is significantly better than using a plugin or mod that writes the IP addresses to a database because adding tens of thousands to millions of IP addresses to a database will dramatically slow your site down.5. Diagnose Hidden Problems
In general, coding-related problems are tucked away from view in the HTML code.
Because most sites are templated, the errors will be multiplied across every page that shares the templated structure. Learning how to use an HTML validator is straightforward, but understanding HTML is important for interpreting the results.
Coding errors can be glaring and obvious, like omitting a closing bracket (>).
Or it could be subtle, like the use of a non-standard character in the code, like a smart quote, the curly type of quotation mark (“ ”) instead of the expected straight form of quotation mark (” “).
This error commonly occurs when someone copies code from a software device that inserts smart quotes as a default feature.
The curly quotes issue can dramatically disrupt how a webpage is indexed and parsed.
That means that if you use something like this in the HTML code:
Google will not see it because the curly quotes (smart quotes) stop it from seeing it as a meta robots tag and will therefore proceed to index the content.
Here’s another example.
If you code a link in this manner:example
The link will be interpreted like this:https://example.com/test.htm
If, however, you use curly quotes for the same code:example
The link will be interpreted like this:https://%E2%80%9Cexample.com/test.htm%E2%80%9D
These kinds of errors are not the kind of thing that an auditing tool is going to automatically find and conveniently add to a list.
You need to know how to code to recognize broken code on a visual inspection or at scale if it shows up as an anomaly on a Screaming Frog scan.
Otherwise, the source of a crawling error will stay hidden until someone who can read HTML or understands the output from an HTML validator can inspect the site.6. Coding Can Help Break SEO Stalemates
The word stalemate is from the game of chess. It describes a situation where the gameplay is brought to a standstill in which neither side can move to win. It’s essentially a state that counts as a tie.
The same situation happens in competitive industries where everyone uses the same publishing platforms, the same optimization plugins, the same content strategies, and the same link promotion strategies.
The competition between the sites is largely equal, with no site having a clear advantage over the other.
An SEO with coding skills can break that kind of stalemate.
For example, many templates ship with liberal use of headings for things that don’t require a heading element, like the navigation on the side panel.
With coding skills, it’s easy to create a child theme and fix the rogue heading elements so that they use CSS and not headings for styling on-page elements.
I’ve used my coding skill to completely change sections of a template so that it’s more user-friendly, change the colors of various on-page elements so that they’re more accessible for color-blind visitors, and add dynamic bits of content using PHP to custom-make title tags as well as to remove superfluous parts of a webpage.
Coding skills help provide a ranking edge to any site and can be used to improve the user experience beyond what a template offers.
It is especially important in competitive niches where competitors are optimized to the highest degree and where squeezing out advantage is at a premium.7. Troubleshoot A Hacked Site
Website security doesn’t seem something an SEO should be concerned about.
But it becomes very clear that website security is indeed an SEO problem when the search rankings of a hacked site start to disappear.
Knowing how to code, particularly with gaining a general understanding of how PHP files work within a given content management system (CMS), can help demystify a hacking event.
Just knowing the broad outlines of how PHP works and how all the parts of the CMS work together goes a long way to understanding what went wrong and how to fix the problems.
Some vulnerabilities can lay hidden for months or years before they are discovered. WordPress 5.9.2 was released to address cross-site scripting vulnerabilities that were in the WordPress core itself.
In the case of the WordPress vulnerability, the problem arose due to an arcane coding mistake where the order in which security processes were coded created the situation where a hacker could bypass those same security measures.
It illustrates how mistakes can sneak in through legitimate software and not necessarily be caught in time to prevent a hacking event.
Google might notify the site owner through Google Search Console about a hacked site, but Google Search Console won’t fix it for you.
When working in a corporate or educational environment where the templates are locked in, and one can’t plug in their way out of a predicament, knowing how to code can speed up the otherwise painful process of publishing webpages.
Whether one works in a Drupal or WordPress environment, having the ability to keep a cheat sheet of code snippets saves so much time, even with something trivial like changing a link without having to go through 10 steps using the native WYSIWYG interface and dealing with idiosyncratic code.9. Optimize For Page Speed
The suggestions for improving page speed that Google’s PageSpeed Insights provides will no longer be cryptic once one learns how to code.
It’s not like one has to learn how to code an entire website from scratch, either.
Python is a programming language that can be used to automate a wide range of SEO tasks from crawling, data analysis, natural language processing (NLP), and much more.
One of the great things about Python is that there might not be a need to code a tool from scratch because there are many Python SEO scripts that can be downloaded online.
A great thing about Python is that one doesn’t have to code scripts for all the different SEO tasks that are needed. Many of those scripts are available as downloadable Python libraries containing the relevant modules.
A Python library is a collection of modules. Python modules are the files themselves.
According to Ruth Everett in her Introduction to Python, these are some useful Python libraries:“Pandas: Used for data manipulation and analysis. NumPy: Useful for scientific computing. SciPy: Used for scientific and technical computing. SciKit Learn: Machine learning for data mining and analysis. SpaCy: A great natural language processing library. Requests: A library for making HTTP requests. Beautiful Soup: Used to extract data from HTML and XML files. Matplotlib: For creating visualizations from data.”
Another important Python library is TensorFlow, a free and open source library that can be used for creating machine learning applications.
With TensorFlow, a search marketer can build a neural network or a recommender system.
Directly related to SEO, TensorFlow can be used to automate the process of creating title tags at scale.
A skilled SEO who learns how to use Python will be able to scale their existing skills to new levels.Learn How To Code
Gaining the ability to code is (arguably) optional, and one can still be a competent SEO without that knowledge.
A person who can code is not necessarily a better search marketer than one who doesn’t know how to code.
But learning how to code can make a good SEO an even better one because knowledge provides advantages.
More Resources:Ask An SEO: 3 HTML & Coding Questions Answered Top 8 Skills Every Great SEO Professional Needs To Succeed Advanced Technical SEO: A Complete Guide
Featured Image: ASDF_MEDIA/Shutterstocksource
Next SEO article:
Search Engine Journal Promotes Jessica Cromwell To VP Of Sales
I am thrilled to announce Jessica Cromwell’s well-deserved promotion to VP of Sales for Search Engine Journal.
I can’t believe it has been almost 10 years since our partnership began. Back in 2013, Jessica started with us in a part-time administrative role. It quickly became apparent that I had a promising talent on my hands– a quick study, resilient, determined to take on new challenges and make the most of every opportunity that came her way.An avid baker, here’s Jessica with her apprenticing niece, showing off their bûche de Noël. Photo credit: Jessica Cromwell
She took over our budding events program and subsequently whipped SEJ Summit into shape. Her next challenge: our direct sales, or should I say, our lack of. Jessica ended up building our direct sales strategy and operations from scratch.
I’m especially impressed with her customer success practice – our advertisers can’t say enough good things about it. She gamely celebrated her birthday with us at Pubcon for 5 years straight– putting her advertisers and her team first. She’s a smart operator who understands the power of collaboration and employee empowerment.Finishing the Ironman 70.3 in Santa Cruz, CA. Photo credit: FinisherPix
She’s just finished her first Ironman, is a lifelong learner, is the embodiment of our culture and values, and if you can’t tell by now, I am so proud of Jessica Cromwell. I’m excited about our future plans together!source