On-Page SEO: Optimizing your WordPress Site with Yoast SEO

By Marshall Reyher | Last Updated: November 22, 2018

When you first start your WordPress site, it’s crucial that you give it the best possible chance for success. In this WordPress SEO guide, you will be taken through the steps needed to set up and optimize your website for the search engines.

If you think that by following this guide your site will shoot to the top of the 1st page on Google… you’re sadly mistaken. It will, however, ensure that you have a solid SEO foundation in place.

Getting SEO results takes a lot of time, hard work and in some niches, a huge budget.

Don’t feel like reading through this long guide to implement these tactics? No problem! I offer FREE WordPress Setups so you can let me take care of configuring and optimizing your site for you. Don’t have time to read the whole post right now? You can download this guide as a PDF and read it later.

What is SEO?

SEO stands for Search Engine Optimization, and it’s the practice by which you increase both quantity and quality of traffic to your website through organic search engine results.

You want to create a website which is optimized for the search engines, and easy for them to index.

When people search for topics you write about, you want your website’s pages and posts to have the best chance possible to show up on page 1 of Google search results.

Why is SEO important?

For many sites, search engines provide the largest source of traffic. They use complicated algorithms to decipher and rank pages accordingly in search results.

By optimizing your site for SEO, you are making it as easy as possible for Google – and the other search engines – to index your content.

Step #1 – Choosing a domain name

The first thing you’ll need to consider when starting a website is a domain name.

It’s important that you keep a few things in mind, including:

Choose a domain which is short and easy to type. Don’t confuse your potential visitors by selecting a long or confusing name.

Make sure that it’s brandable. When people read or see your URL, it sounds like a brand.

Refrain from using numbers and hyphens in your domain. If you use numbers in your URL, people won’t know if it’s written as a number or spelled out. Hyphens just make your domain look cheap.

Use a URL that is easy to pronounce. If it’s hard for people to say, they won’t be able to easily spread the word about your brand.

Get a .com domain if you can. If it’s not available, you can always append or modify it.

Check the availability of your desired domain name on social media sites. You can use a tool like Knowem to check the availability of your domain across numerous sites at once.

Step #2 – Selecting web hosting

Your web host plays a crucial role in the speed at which your site loads. Choosing a bad hosting service will cause you and your visitors nothing but problems.

Make sure you choose a reputable web hosting company, and don’t just pick the cheapest service possible. You will end up with a slow-loading website, which is sure to annoy your visitors and cause them to leave.

Spend a few extra dollars and get quality hosting. I use and highly recommend SiteGround – they use quality hardware and provide excellent customer/tech support.

If you purchase hosting through the affiliate link above, you will qualify for our FREE WordPress Setup.

For a new site, a shared hosting plan is all you will need. You can always upgrade your website later if you start getting a lot of traffic.

With most sites on the web, shared hosting will always be sufficient.

Step #3 – Installing WordPress

As soon as you’ve registered a domain name and purchased web hosting, you are ready to install WordPress. There are a number of ways to do this, and I’ll be going over the 1-click installation method offered by many hosts.

Click the WordPress Installer and you will be guided through the setup.

Next, click on the Install tab.

Select your protocol:

http://

http://www.

https://

https://www.

Personally, I prefer URLs without www, but in terms of SEO it makes no difference whether you use www.mysite.com or mysite.com.

I recently added SSL to many of my own sites, and I recommend you do the same. Let’s Encrypt provides free SSL certificates, so there is no reason not to make your site secure.

While you don’t necessarily need an SSL certificate, it’s a very wise idea to install one. Having SSL on your website provides you with a small ranking boost according to Google.

This means that if two sites are identical in terms of quality and SEO, the one with an SSL certificate will outrank the other.

I recommend installing SSL on your site from the get-go, because it’s quick and easy. Siteground lets you install a certificate in their control panel with a couple of clicks.

If you use a different hosting company, simply contact tech support or google “install SSL on + your web host name” to find instructions for your particular host.

Once you select your protocol, choose your domain from the dropdown list.

Enter the name and description for your site under Site Settings. Don’t worry about this too much now. You can always change it later.

In the Admin Account area, enter your Admin Username (don’t use admin). The installer will automatically create a username and password for you, but feel free to change them if you want. Make sure you use a strong password (e.g. NOT your dog’s name followed by your birth year – fido1975).

Under Admin Email, enter your email address where you want to receive notifications.

Select the language of your WordPress installation and ignore the rest.

Finally, click the Install button and let the installer work its magic.

Verifying your site will help you resolve any crawl errors (broken links or non-working pages) that may appear, and you can use Google Search Console to further optimize your website.

Titles & Metas

In the General tab, you can choose which separator you want to use. This is the symbol between your post/page title and site name (e.g. Free WordPress Setup • MPR Studio).

I typically use the bullet symbol, but have been known to use the vertical line from time to time as well.

If you’re using a widgetized homepage, you can set titles and meta descriptions in the Homepage tab.

If not, you’ll add them under Edit snippet on the page itself.

In the Post Types tab, you’ll have the option to set which items you’d like indexed in search engines. The settings above are good for the majority of sites, so it’s recommended that you use them.

Custom variables

You should ALWAYS create custom SEO titles and meta descriptions for each page and post, but if you don’t the templates in these Yoast settings will be used by default. Take advantage of all that Yoast SEO has to offer and truly optimize your site.

Basic variables

There are a number of variables that you can use to customize various items in Yoast, including the following:

%%date%% – replaced with the date of the post or page.

%%title%% – replaced with the title of the post or page.

%%parent_title%% – replaced with the title of the current page’s parent page.

%%sitename%% – uses the site’s name.

%%sitedesc%% – uses the site’s description or tag line.

%%excerpt%% – automatically grabs a summary from the page or post content (first sentence or two of text).

%%excerpt_only%% – replaced with only post/page (no automatic generation in this case).

%%tag%% – replaced with used tag/s.

%%category%% – replaced with post categories (comma separated).

%%category_description%% – replaced with the category’s description.

%%tag_description%% – replaced with the tag’s description.

%%term_description%% – replaced with the term’s description.

%%term_title%% – replaced with the term’s name.

%%searchphrase%% – replaced with current search phrase.

%%sep%% – displays the separator chosen in your theme’s title tag.

Meta Robots

These switches determine whether different items are indexed by the search engines.

Items which should be indexed:

Pages

Posts

Products (if you run an eCommerce site)

Categories (only if your category pages provide real value)

Things you don’t necessarily need to index:

Tags

Affiliate Links

Link Categories

Author Archives (unless you have multiple authors on your site, in which case you should noindex, follow them).

Date Archives

Subpages of Archives

Many items in the 2nd list above would cause duplicate content on your site, which is another reason not to index them.

Taxonomies

With your blog category pages, you’ll only want to index them if they provide value to your visitors. With most sites, Categories can be set to noindex.

Make sure you noindex Tags as well because they can cause duplicate content, and are of little use.

You can keep Format-based archives enabled, but make sure Meta Robots is set to noindex.

Make sure that Link Categories are set to noindex because you don’t want search engines to index your affiliate links.

Archives

You’ll want to set Author archives to Disabled if you have a one author blog. If you have multiple authors on your site, you should enable it, but make sure it’s set to noindex, follow so it doesn’t appear in search results.

You can disable the Date archives settings because they can create unwanted duplicate content and you don’t need them.

Under Special Pages at the bottom, you can leave the default templates.

Social

You can help Google learn about your social profiles by adding your various accounts under Yoast’s Social settings. It allows you to refine how your pages and posts are shared on each social network, and lets you upload images which are sized according to each platform’s specifications.

Facebook

Enable Open Graph meta data to upload custom images for both pages and posts. Using this, you can make sure that your images match the size requirements for various social networks.

Twitter

Pinterest

Google+

Optimizing social media

After you enable meta data for each social network, you can upload media images by clicking on the share icon in the Yoast SEO meta box area.

This makes sure that image thumbnails are formatted properly when your content is shared on social networks. If you want to take advantage of this feature, you’ll need to create 2 images of different sizes for each post.

XML Sitemaps

When you create content for your website, you want to make sure that search engines can easily index it. The built-in XML Sitemap feature in Yoast allows you to generate a sitemap which is automatically updated every time you add content to your site. A sitemap is simply an XML file which lists your website URLs.

If for some reason Yoast SEO is incompatible or causes a conflict when used with your theme, All In One SEO Pack is a great alternative. Both of these awesome plugins have similar features.

You can configure it to include assorted information about each URL, including:

when it was last updated

how often it changes

its importance related to other URLs

Creating a sitemap and submitting it to the search engines mentioned above allow them to crawl your site more intelligently and effectively.

Submitting your sitemap to Google

Under the General tab in XML Sitemaps, click on the XML Sitemap link (see screenshot above).

Copy the sitemap_index.xml part.

Login to Google Search Console.

Go to Crawl > Sitemap in the left sidebar.

Click ADD/TEST SITEMAP and enter sitemap_index.xml in the box provided.

Finally, click Submit Sitemap.

Submitting your sitemap to Bing

Copy your entire sitemap URL (e.g. yoursite.com/sitemap_index.xml).

Login to Bing Webmaster.

Go to Configure My Site in the left sidebar and click on Sitemaps.

Enter your complete sitemap URL in the box and click SUBMIT.

Submitting your sitemap to Yandex

Copy your entire sitemap URL (e.g. yoursite.com/sitemap_index.xml).

Login to Yandex Webmaster.

Go to Indexing in the left sidebar and click on Sitemap Files.

Paste your complete sitemap URL in the box and click SUBMIT.

Adding your XML sitemap to Google, Bing and Yandex ensures that your site content can be easily indexed by the major search engines.

You definitely want both posts and pages in your sitemap, but don’t want media attachments or affiliate links.

If there are any pages you’d like to exclude from your sitemap, enter their Post IDs here. You most likely won’t need to use this but hey, you never know…

Advanced

They’re helpful for showing site visitors and search engines your website structure. If you have a site with a lot of content, it’s a good idea to use them.

While some themes natively display breadcrumbs, not all of them do. If your theme doesn’t show them by default, you can add them by following Yoast’s guide here.

Permalinks

Strip the category base from the category URLs

If you are using a permalink structure which contains the term “category” in it (which is NOT recommended), then you can set this to Remove to get rid of it.

Beware: this can cause a bunch of your post and page URLs to change, so it’s a good idea to set up 301 redirects for any URLs that change. If your existing URLs with “category” in them have a lot of backlinks and traffic, you probably want to leave them alone and leave this set to Keep.

Redirect attachment URLs to parent post URLs

Enabling this makes sure that people will be redirected to the parent page or post of all media items (images, PDFs and other uploads). It’s a good idea to Enable this redirection.

Remove stop words from slugs

Short, concise permalinks are good for SEO, so you should always try to use them. Instead of automatically removing stop words (a, an, the, on, at, by, etc.) with this setting, you should instead manually change them for each post/page.

Remove the ?replytocom variables

You want this for two reasons:

It removes URLs which could result in duplicate content.

Helps improve search engine crawling efficiency.

Redirect ugly URLs to clean permalinks

This can help redirect people to the correct URL if someone linked to you using a link with a typo. It is NOT recommended, so leave it turned off.

RSS

You can leave the default settings in the RSS tab, unless you’d like to customize how your posts appear in RSS feeds.

Tools

Bulk Editor – This lets you bulk edit your SEO titles and meta descriptions in a list view instead of going through each page or post individually. It’s SUPER IMPORTANT that you optimize both your titles and meta descriptions to help optimize click-through rates. Craft them with care and include your focus keyword in both places.

In the bulk editor, you won’t see the colored bar which shows you the ideal length so you’ll have to count the characters using an online tool such as Online Character Count Tool.

Enter your SEO title (up to 55 characters) and click Save.

Enter your meta descriptions (up to 155 characters) and click Save.

File Editor – Easily edit your robots.txt and .htaccess files.

Import and Export – Under Import and Export, you can do the following:

Import settings that you exported from Yoast on another site.

Export current Yoast settings for use on another site.

Import settings from a number of other SEO plugins, including: HeadSpace2, All in One SEO, Jetpack SEO, WooThemes SEO and wpSEO.

To import settings used on another site, click the Choose File button, locate your file and click Import settings.

Do you want to export your Yoast settings? Check the Include Taxonomy Metadata box and click the Export your Yoast SEO settings button.

Under the Import from other SEO plugins tab, simply tick the box for whichever plugin you were using, locate the file and click Import.

Search Console

To connect Search Console with Yoast, you’ll first need to authenticate your account. This area of Yoast is super helpful, and will show you various crawl errors (missing pages) on your site. Then, you can set up redirects so your visitors land on the right page.

Redirecting your site traffic is super important for overall user experience. If you’ve changed your permalink structure or deleted pages and posts, you’ll likely have some crawl errors that need to be fixed.

Authenticate Google Search Console in Yoast Settings

Under the Settings tab, do the following:

Click on the Get Google Authorization Code button.

Login to your Google account associated with Search Console (which you created earlier in this tutorial if you follow instructions).

Grant Yoast access to that account.

Copy the authorization code and paste into Yoast.

Then, click on the Authenticate button.

Choose which site you’d like to use from the dropdown (only if you have more than one) and click the Save Profile button.

Once your profile is authenticated, Google will eventually populate your crawl errors. This can take a few minutes or hours, so be patient.

Setup Redirects for Crawl Errors

With all of your crawl errors, you should setup 301 redirects. You can use Yoast SEO Premium’s built-in redirection feature or install a separate plugin to take care of it.

I use and highly recommend Redirection – it’s easy to use and gets the job done.

To set up a redirect using Redirection, follow the steps below:

Go to Plugins > Add New in your WordPress dashboard. Search for Redirection and install, then activate the plugin.

Keep your titles to around 55 characters or below to make sure they display properly in Google search results. Use the colored bar below the SEO title field to create titles of the proper length. As long as the bar is green, you’re good to go.

Meta Description

These are the excerpts that show up below your titles in the search engines. By making them compelling, you effectively encourage searchers to click on your result, and not someone else’s.

For ideal SEO, your meta description should include relevant keywords used in a natural fashion. Provide a simple overview of your page or post, and make sure the colored progress bar below the meta description text field is green (just like you did with the SEO title).

If you don’t specify a meta description in the Yoast box for each page and post, search engines will grab the first 155 or so characters of your content by default (as long as the %%excerpt%% tag is used in your meta description template under Titles & Metas > Post Types). This is not ideal, so write custom meta descriptions for all your site’s pages and posts.

Keyword Density

Make sure you use your keyword in the intro of your page or post, and a few times in the content body as well. In addition to using your main keyword, use a few similar keyword phrases as well.

Whatever you do, NEVER stuff keywords in your content. Use them naturally, and remember that you should always be writing for people and not search engines.

Optimizing Images

Whenever you upload media items to WordPress, make sure they are completely optimized for both SEO and speed.

If you want to learn more about optimizing your site images, check out my comprehensive Image SEO Guide.

Internal and external links

You can make your content even more useful by including external links to additional resources. Your visitors will appreciate it, and Google likes it as well.

Adding internal links to other pages or posts on your site helps Google better understand your site structure, and provides more useful content for your visitors as well.

Content length

When creating content for your blog, longer is generally better. In-depth, actionable content is much more likely to rank in search than short pieces. It is also much more beneficial for your site visitors, and will help your site build a reputation as an excellent resource.

Adding Accelerated Mobile Pages (AMP)

Accelerated Mobile Pages (AMP) is a Google project created to help your posts load more quickly on mobile devices. They also add the AMP icon to your mobile search result snippets.

Adding AMP to your WordPress site is very easy. Simply follow the steps below.

Go to Plugins > Add New and search for AMP.

Install the AMP plugin (the one by Automattic).

While on the search results, you’ll also see the Glue for Yoast SEO & AMP plugin. Install it as well and activate both plugins.

View any of your posts (AMP by Automattic does not provide support for pages at this time) in AMP by simply adding /amp/ to the end of the URL (e.g. yourcoolsite.com/fun-stuff/amp/).

You can change the design and enable custom post types under Settings > AMP in Yoast.

Once Google recrawls your site, the AMP symbol will be added to your search results for mobile.

Check out errors for your AMP posts using Google Search Console.

Using Accelerated Mobile Pages, it’s possible that you’ll run into some problems. When I installed and activated it on my site, no images showed up in the AMP version of my posts. I think it’s a theme conflict of some sort, but I’m not sure.

Use My Yoast SEO settings

If you’d rather not spend a whole bunch of time manually configuring your Yoast SEO settings, you can download the zip file below and import them into your site under SEO > Tools > Import and Export > Import.

In Titles & Metas > Post Types > Taxonomies, make sure you go through everything to decide whether to index it or not. Also, decide whether you want to include the date in your snippet previews.

In Social Settings, enter links for all your social profiles and upload your logo in the facebook section (used when you share posts/pages without artwork). Verify your site with Pinterest and enter your Google+ page if you have one.

In Search Console > Settings, authenticate Yoast with your Google Seach Console and wait a few days for the data. Then, fix all the crawl errors on your site.

Add Accelerated Mobile Pages.

Installing other must-have plugins

One of the reasons WordPress is so great is the amount of plugins you can use. From speed and security to SEO and much more, you can use them to add a wide variety of functionality to your site.

It’s important that you ONLY install quality plugins. There are so many to choose from, and it can be hard to decide which ones to use. As I wrote in my post about must-have plugins, there are a few that you can automatically add to any fresh WordPress installation.

W3 Total Cache

While W3 Total Cache is not necessarily a SEO plugin, it will help you improve your site’s SEO and user experience by making it load more quickly. Website speed is very important because most people WILL NOT wait for a slow website to load.

The role of caching should never be overlooked when optimizing your site. W3 Total Cache will help you increase the speed at which your site loads, which is super important.

WordPress is database-driven, which means that it relies on queries to and from a MySQL database to fetch and render pages and posts. This process causes your site to load more slowly and use more server resources.

Caching plugins effectively create static copies of your site pages and posts, which are then served to your site visitors. W3 Total Cache greatly improves your site speed, so make sure you install it.

There are a number of other factors which affect your website speed, including:

the quality of your hosting plan – certain hosts should be avoided at all costs, including all the ones mentioned in this post.

the theme you’re using – some are very poorly coded.

the amount and quality of plugins you’re using – some are notorious for slowing down sites.

the size of images on your site – make sure you are always optimizing your web images.

Wordfence Security

Wordfence is a super-effective security plugin to help protect your site. It comes in both free and premium versions, both of which offer a complete firewall to block brute-force attacks, malware, back door vulnerabilities and much more.

It’s important that you keep your WordPress site safe from malicious attacks because they can greatly harm your site’s SEO… and fixing a hacked site is not fun.

Do yourself a favor and install Wordfence right away! If you need help figuring out the best settings, take a look at my Wordfence Security Guide.

Conclusion

Did you learn anything in this tutorial? I hope you did, and that your self-hosted WordPress site now has a solid foundation with all the tools needed to grow and attract more traffic.

Have anything to add? Did I miss something? I aim to make my tutorials as complete as possible, but am always open to suggestions for improvement.

Are you struggling with any part of your WordPress SEO optimization? Leave me a detailed comment and I’ll try my best to help you out.

This step-by-step guide to WordPress SEO covers everything you need to know for on-site search engine optimization, including choosing a great domain name and quality web hosting, setting up self-hosted WordPress, configuring Yoast SEO, and submitting your site to Google and Bing so it's properly indexed.