Search Engine Optimization
If you are the owner of a website, then you will eventually have to learn about Search Engine Optimization, or SEO. This guide will help you optimize your website for ON-Site SEO, so that it can rank higher on major search engines such as Google, Bing and Yahoo.
- Pretty URLs
- Robots.txt
- HTTPS
- XML sitemap
- Site speed
- Broken links
- Schema Markup
- AMP Pages
- Free themes
- Site structure
- Pagination and crawling
- Comments
- Duplicate content
-
Pretty URLs
Earlier WordPress versions had what they call “ugly” URLs that had too many numbers. For example, a blog post used to have a URL like this http://mydomain.com/?p=3455543241354.
The latest versions use “pretty” URLs by default in the “date+name” format, e.g. http://mydomain.com/2016/02/28/sample-post/.
While this looks so much better, you might want to consider taking the date off your URLs. In this case, your older posts with great and still useful content don’t seem to be irrelevant because they were written in the past.
In order to adjust URL settings, go to Settings > Permalinks in your Admin panel.
Note: In order to enable pretty URLs, WordPress should have write access to the .htaccess file, if you run your WordPress website on an Apache web server (most likely this is the case).
-
Robots.txt
WordPress does not create a physical, permanent robots.txt file on the server. The CMS generates it on the spot, when a client requests it via http://mydomain.com/robots.txt. However, if you manually create a robots.txt file in the WordPress root directory, it will override the default settings.
If you stick with a dynamically generated robots.txt file, you have two options to manage it:
- Use WordPress plugin like Multipart robots.txt editor. The plugin lets you include the following records in robots.txt: WordPress core records (it will include the /wp-adminfolder), plugin and theme generated records, the list of ‘bad bots’ (maintained by the plugin developers), and your custom records.
- Edit the do_robots() function in /wp-includes/functions.php and customize it up to your requirements using the $output variable. See the code below.
In most cases, you wouldn’t need to make changes to robots.txt often, so it’s more reasonable to use a static robots.txt file. This way you’ll be able to easily access it via FTP anytime to make changes.
-
HTTPS
In 2014, Google added HTTPS to the list of ranking factors. It’s not among the top important ranking signals, but going HTTPS may still give you a slight ranking boost.
Note: If you are starting a new project, it’s wise to implement HTTPS from day one.
Here’s how you can set up HTTPS on your WordPress site.
- 1. Get a dedicated IP address for your website.
- 2. Obtain SSL certificate.
- 3. Configure your web server to use the SSL certificate.
- 4. The easiest part: go to Settings > General in the WordPress Admin panel. In the WordPress Address (URL) and Site Address (URL) fields, fill in your website home page URL with https in it.
-
XML sitemap
WordPress doesn’t generate XML sitemaps out of the box. You may use one of the plugins to add this functionality. Google XML Sitemaps is probably the most widely used and reliable solution. When choosing an XML generator plugin, make sure it lets you do the following things:
- Include/exclude user-defined URLs
- Include/exclude WordPress taxonomies
- Set crawling priority
- Change crawling frequency.
Once installed and activated, Google XML Sitemaps automatically generates the sitemap and notifies the search engines about it. The default plugin settings will meet the requirements of most users. The plugin generates the sitemap on the fly, when a client requests it, so there is no physical XML file on the server.
Note: If your website is updated rarely, it’s better to create a physical, permanent XML sitemap file, and upload it to the WordPress root directory. This will reduce the server load.
-
Site speed
Site speed is one of the most important “technical” ranking factors that is used by search engines. It is important that you always work on improving your site’s load time. There are a few easy solutions to help you improve your WordPress website’s speed.
- 1. Easy on the Plugins. Plugins are useful, but they slow the site down. I would recommend only installing plugins that provide real value. Check the plugins before installing them to the production website, and test your website speed both before and after installing them.
- 2. Clean up your WordPress theme from data base calls, functions, and Java scripts.
- 3. Install a caching plugin. These plugins create HTML versions of the dynamic pages and return them when requested by a client. This reduces server load time and speeds the website up. There are two leading caching plugins available- W3 Total Cache and WP Super Cache. W3 Total Cache can be customized and is full of great features, but you have to have have a solid understanding of web technologies to use it appropriately. WP Super Cache is easy to use and is designed to meet the typical requirements of the average user – you just switch it on and it works.
-
Broken links
Checking and fixing broken links is time consuming, so I would recommend using the Broken Link Checker plugin a try. It scans your website for broken links in both post pages and comments, and then sends an email that logs the results of the check. All the broken links are listed in the spreadsheet.
-
Schema Markup
Schema markup is a special data format that is used to convert the data into the structured data. The term “structured data” stands for the meaningful information.
Search engines always try to improve their results and stay relevant. For example, Google’s search result pages are “enhanced” with a lot of additional information, including recipes, flight information, rating stars, etc. The snippets with enhancements normally have a higher click-through-rate and get more traffic than plain snippets. These enhancements or content type features appear in search only if Google understands the data on the source websites. Since search engines don’t fully understand your page content as a human would, you have to help it by including data that search engines can navigate.
There is the Schema syntax that adds essential mark ups to your blog. It adds article schema to each blog post in JSON-LD (the syntax that is recommended by Google). Optionally, you can include Breadcrumbs, Comments, Audio-/Video-object schemas, as well as the information about your organization and authors.
-
AMP Pages
AMP stands for Accelerated Mobile Pages. Its function is to speed up the load time of the webpages on the mobile devices. AMP technology strips a lot of HTML tags, JavaScript and CSS; plus, it leverages server-side caching. AMP pages look lean and lack the fancy styling of ordinary webpages.
AMP is not likely to have the direct effect on the website rankings, it’s more about user experience and load speed.
WordPress comes with a default AMP plugin. The only thing you should care about is the compatibility with other plugins. In particular, make sure that all SEO meta-data is correctly passed from ordinary pages to the AMP pages.
-
Free themes
I do NOT recommend installing free themes that don’t come from the official WordPress directory. A “free” theme from an unverified source may contain malicious or unwanted pieces of code.
Very often “free” themes have some outgoing links included in the footer or sidebar. These links typically have commercial anchors and they have nothing to do with the developer of the theme. The license agreement of such themes usually prohibits you from removing the links. It’s up to you to decide how to deal with them, but at least don’t forget to add a “nofollow” tag.
Always scan the theme files for the obfuscated pieces of code (it may look like this: aGVsbG8gcGVvcGxlIHRoaXMgYW4gZW5jb2RlZCBzdHJpbmc= ); if you come across such strings, I would highly recommend that you select an alternative theme.
Also, pay attention to the usage of third-party JavaScript in the theme. Check out the theme’s functions.php file. It may contain some undesirable code too.
-
Site structure
When you mold the structure of your WordPress website, you may adopt either of the two approaches or their combination:
- 1. Use Page as the core element. This lets you set a parent-child relationship among the pages to arrange your content into groups.This structure is handy if you’re building a simple website for your business. The logical hierarchical arrangement of Pages will then allow you to insert breadcrumbs, nested menus, etc. easier.
As you can see above, this structure is purely hierarchical: there is only one primary way, or path, to any given page.
- 2. Use Post as the core element. The content is then structured using Category and/or Tagtaxonomies. Unlike Tags, Categories are hierarchical.This is the best choice for blogs, product catalogues, directories, and similar websites. Category or Tag pages list all the posts that belong to them, while Page only displays its content.
-
Pagination and crawling
Blog Category and Tag pages normally list multiple posts and consist of a series of pages. By default, the navigation across the series of pages is implemented with two links: “Newer posts” and “Older posts”. However, this solution is not always optimal for a number of reasons:
- It’s not user friendly (What if I want to skip to page No. 9 in the series?)
- It’s harder to reach the paginated content for the search engines’ crawlers.
WP-PageNavi fixes these issues. The plugin replaces the standard pagination with “Previous 1 – 2 – 3 – 4 – … Next” kind.
-
Comments
Enable comments only if you feel you have enough resources to moderate them and follow up on them, otherwise the comments section will be chock-full of spam. The few steps below will make your life easier.
- 1. Automatically close comments after a certain period of time since the post was published. In the WordPress Admin Panel, go to Settings > Discussion. Check the Automatically close comments on articles older than box and enter the number of days you’d like comments to be open for.
- 2. Activate the Akismet plugin. Akismet is included in WordPress by default. You should visit the Akismet website and get the API key to use the plugin. Akismet is free for personal use. If you run a commercial website, you can get the paid API key. Keep in mind, it does make mistakes and you’d still need to review the comments.
- 3. Give WP-SpamShield Anti-Spam a try. In this scenario, the user wanting to leave a comment would need JavaScript and cookies to be enabled in their browser. WP-SpamShield Anti-Spam also sets the minimal comment length and commenting speed. As a result, it stops primitive spam bots pretty well.
-
Duplicate content
External duplication:
Content of a WordPress site is normally available in RSS format. This makes your posts easy to scrape and re-publish for blogs and platforms that live off scraping content. Google’s pretty strict about content uniqueness and may not be able to tell between the original and the scraped version; so it’s in your best interest to make your website harder to scrape.
In the WordPress Admin Panel, go to Settings > Reading. Select For each article in a feed, show: Summary. You can also reduce the number of items shown in syndication feeds.
Internal duplication:
By default, WordPress generates a lot of duplicate content. It has Archive, Author, Category, and Tag pages, and there may be hundreds of tags and categories. The same page may belong to all of these groups, and be listed dozens of times across the website. Here’s how to deal with the problem.
- 1. Use the minimal required number of categories and tags, and develop guidelines for the website contributors on how to use them. For example, consider if it is useful to populate the sidebar of your blog with Calendar, Categories, and Tag Cloud simultaneously? Will it provide value to the user? Will the user benefit if there are 42 tags attached to a blog post?
- 2. Use the canonical tag. There are several plugins to help you do this, e.g. Yoast SEO.
- 3. Implement rel=next/previous tags for paginated content.
- 4. Create an excerpt for each post you publish. It will appear both in RSS feeds and on Category, Tag, Author, and Archive pages (depending on the theme settings). As a result, your original content will stay on the page where it belongs, and the excerpt will be duplicated on other pages.
If the excerpt doesn’t appear on Archive or Category pages in your theme by default, you’d have to create custom page templates. The detailed the_excerpt() function reference and the full guide on WordPress Templates will come in handy if you are going to cope with this task yourself. - 5. Create meaningful descriptions for tags and categories. Thus, each category or tag page will have unique content above the list of posts or excerpts.