WPEngine SEO – Making it better

WPEngine SEO

WPEngine SEO

We love WPEngine.

More than half the small business websites we work with were on rubbish hosting initially. Many of these businesses were paying a premium price for their hosting but the hosting was such poor quality it’s to the point where it’s hurting the SEO rankings of the site and negatively impacting Adwords campaign performance.

Our solution is to get these sites across to WPEngine. WPE is rock solid reliable and is lightning fast, it immediately solves the speed and reliability issues. Generally we get load times that sit in the 0.5-2 second range on our WPEngine environment.

(Actually, in almost all cases with our clients the first thing we do is upgrade the hosting. Hosting is the fundamental building block of any online marketing you do. Rubbish hosting=rubbish marketing campaign performance, whether that’s SEO, Adwords or any other marketing channel that drives visitors to the website.)

Just like any hosting company, WPE isn’t perfect. There are a number of under the bonnet tweaks we make to our WPE instances to make them run even faster and squeeze some additional SEO juice out of them.

I’ve found myself regularly referring friends to WPE and then sending them a long winded email with all the tweaks we make….after writing that email a dozen times last month I figured I’d turn that list into a proper blog post and at a minimum save myself a bunch of time.

So here it is, effectively our WPEngine setup checklist. If you’re pushing hard on SEO, these small tweaks can make quite a difference.

1. Redirect the .wpengine.com to the primary domain in htaccess

There is a major SEO issue with the default hostname assigned to Wordpress instances in WPE in that they’re given the hostname instance.wpengine.com. This means the site loads up at http://instance.wpengine.com as well the primary domain name the site is running off.

If you head over to Google and search “site:wpengine.com” you’ll see nearly a million pages indexed which highlights how significant this problem is.

Wpengine SEO Problems

Hmm, nearly a million pages indexed. Something isn’t right here.

Now, the impact of this issue has been significantly reduced since WPE started adding a disallow into the robots.txt file for this domain. This file tells the Google crawler what it can and can’t look at so adding in this disallow line means means Google shouldn’t be crawling this domain.

In theory this is a good solution but from an SEO standpoint, it’s not the best possible fix. In some cases the fix won’t eliminate the SEO problems entirely. Instead a better fix is to add a 301 redirect for that hostname, pointing it back to the primary hostname of your site.

It is possible to mess about in the domains section in the WPE backend and delete that hostname and in some cases this works perfectly fine but we’ve found it often ends up breaking things. We’ve found that adding the redirect into the htaccess file instead is a more reliable solution.

So to fix this problem, add a redirect into the .htaccess file to point the .wpengine.com domain back to your primary domain. The htaccess code snippet we use is below. You might need to clear the WPEngine cache after making this change. Usually we make this change via FTP but the Yoast SEO plugin will allow you to make this edit from the WP admin console.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ALIAS\.wpengine\.com$
RewriteRule (.*)$ http://www.primarydomain.com/$1 [R=301,L]

Make sure you swap out the ALIAS for whatever the name of your hosting instance is and change the “primarydomain” bit to your domain. The working version should look something like below:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^tses\.wpengine\.com$
RewriteRule (.*)$ /$1 [R=301,L]

2. Fix your code so nothing is loading off the .wpengine hostname

This recommendation is related to the previous point. Often when we’ve migrated a site to WPEngine some of the code will continue to point to the .wpengine.com hostname. This is really not ideal at all from an SEO perspective.

This is especially problematic now that resources on the .wpengine.com hostname are blocked in the robots.txt file which means Google can’t see them. In some extreme cases this could mean that Google doesn’t render your site correctly which will absolutely hurt your SEO.

The fix for this varies depending on what resources are being loaded off the .wpengine.com hostname. Sometimes it’s one or two obscure files referenced in the code somewhere, other times it’s a whole bunch of resources, links and pages.

If it’s only a small number of resources then we can manually fix it, if its a lot of resources often jumping into PhpMyAdmin and making the edits there is the quickest way to take care of it.

Checking for this problem is a pretty simple process:

1. Hit the homepage and view source, search for .wpengine in the source code
2. Repeat the process for all your different types of pages or different page templates – make sure you check at least your blog pages, blog index and one of the inner pages on your site.

If you need help with this the guys at WPCurve can probably assist.

3. Set a custom hostname for your CDN and get “flex zones” turned on

We love the CDN feature of WPEngine. Turning it on will give you a decent performance boost and will enable your site to handle more visitors simultaneously without it taking a performance hit.

The CDN will also help speed up the site for visitors outside the country your site is hosted in because parts of the website will load from servers that are geographically closer to them.

The downside of the WPE CDN is that it runs off a hostname that is not on your domain and will end up looking something like http://wpcurve.wpengine.netdna-cdn.com or 72gpf1za5iq428ekh3r7qjc1.wpengine.netdna-cdn.com

This is not really ideal from an SEO perspective as it will cause some small bleed off of your SEO juice.

The solution is simple. Log a support ticket and ask WPE to setup you up a custom CDN hostname, for example cdn.hostname.com. This does add a little bit more fiddly-ness into getting the CDN enabled in the long term it’s worth it especially if SEO is a key part of your marketing strategy.

While you’re talking to support, get them to turn on something called “flex zones” on your CDN. This enables extra CDN locations in Australia and Asia which will speed up the site even further for people in these locations. Most of our clients are Australian based and enabling the flex zones has cut site load time by another 1-2 seconds.

4. Check the robots.txt file on your CDN

There are some instances where the robots.txt file on the CDN has a disallow in it. It seems to happen most often when you’ve enabled the CDN for both your primary hostname and the .wpengine.com hostname. In this scenario the CDN pulls the robots.txt file from the .wpengine domain which by default has the disallow line in it.

Bottom line, disallowing resources on the CDN can hurt your SEO.

What to do:

1. Simple, first figure out your CDN hostname, e.g. cdn1.thesearchengineshop.com
2. Paste this into your browser and add /robots.txt on the end.
3. Make sure the file is empty.
4. If it has a Disallow: / in it then the fix is simple, log a support ticket and get WPEngine to fix it.

5. Use Cloudflare.com

Cloudflare is a CDN, website acceleration and security service. it’s a different type of CDN to the inbuilt WPEngine CDN (it’s more like a reverse proxy) so there is benefit in using both. It has a whole bunch of different benefits but the biggest one is that it will cut 0.5 to 1 second off the load time of your website.

It will also eliminate a lot of the garbage traffic and low level spam hitting your site which reduce the load on your site thus further speeding it up.

On top of all that, WPEngine has a weird way of measuring traffic. They measure visits instead of bandwidth and a large proportion of these visits will be spam traffic or non-humans. With Cloudflare enabled, we see roughly a 30% reduction in the number of visits WPEngine is counting so effecitvely reduced traffic bills.

It’s pretty simple to setup, head to Cloudflare.com, setup an account and redelegate your DNS servers.

**Important note, do not enable the Cloudflare caching for your CDN URL as it will break it.

6. Use a third party backup solution (Vaultpress or Blogvault)

Ok so this isn’t an SEO improvement but an important recommendation.

The snapshot feature in WPEngine is fantastic. It gives us a super easy way to backup a site and gives us the ability to roll it back if we screw something up.

From a broader business level perspective having only 1 backup is really not ideal as there’s a fair chance when you need it, it won’t be available or will have a problem. The WPE backup doesn’t actually include all files either which is pretty typical of most Wordpress backup solutions. More info on what’s excluded here: /recommended/wpengine/support/restore/)

Also, if WPE have a major outage it’s likely you won’t actually have easy access to the backups to when you actually need them.

So, with all our sites we use a third party backup solution. Up until recently Vaultpress was our backup tool of choice, BUT, it also has some of the same exclusion as WPEngine. On top of that, it won’t backup any database tables that don’t start with the prefix WP which is a problem for many of our sites. So, we’ve recently switch to Blogvault.

At scale, Blogvault is quite a bit cheaper than Vaultpress but the feature we really love is that it actually tells us what tables and files it’s specifically not backing up and then allows us to include them if necessary.

The interface isn’t quite as polished as Vaultpress but it does the job. I’ve included a couple of screenshots below – to see what’s been excluded click the “skipped” box and a popup will open allowing you to include those files.

 

Blogvault Exclusions

Click “skipped” and Blogvault will show you what it’s not backing up

blogvault-exclusions-popup

Most of the time Blogvault excludes junk files but occasionally it will miss an important file.

 

Check it out at blogvault.net

7. Fix this setting in Yoast

This isn’t a WPEngine specific problem but we come across this all the time and it can easily slow your site down by 1-3 seconds.

Make sure that this setting in the Yoast SEO plugin is disabled:

Yoast SEO Site Speed Issues

Don’t use this setting unless you absolutely have to. If it’s auto-enabled then fix your code so you don’t need it enabled.

Now, if it’s auto-enabled itself it means your theme is not 100% compatible with the Yoast plugin and it needs some tweaks to the code. The edits are really simple but if you don’t know anything about code then get a developer to sort it out for you. Again the guys at WPCurve can probably help here.

8. Use an SSL wildcard cert + Cloudflare

Using Cloudflare with SSL gives you SPDY & HTTP2 support. Without getting into tech specifics, these two protocols will allow visitors to access your site faster to the point where we can shave another 0.5 seconds off the load time and the site will feel like it renders faster to the visitor.

It is possible to use Cloudflare SSL without a real SSL certificate but then that’s going to cause problems with the WPEngine CDN. So, the solution is to use a wildcard SSL cert. This will give you full SSL support on your site AND give you the ability to use the custom CDN hostname with full SSL.

For SMB sites we’ll generally buy our Wildcard SSL Certs from Namecheap.com. The price is roughly ~$95USD/year for the cert. For a money site or site getting a lot of traffic this should easily pay for itself over the course of 12 months in the form of increased site speed.

**Also, important note. WPEngine supports SNI (server name indication) which means you don’t need a dedicated IP address in order to support SSL.

8 Comments

  • Thanks for all the great tips! Just opened a ticket with WP Engine to get a custom CDN hostname and to add the flex zones. Let’s see how that goes.

    • Brendan Tully

      Reply Reply February 12, 2016

      Yeah the flex zones are a huge win, cut load times in Australia and Asia in half. I only noticed it because our WPEngine datacentre is in Sydney and in speedtests we could see the CDN resources slow to load, did some digging and saw maxcdn doesn’t enable Asia or Australia by default. We have a handful of big sites now loading in 400-800ms as a result

      • They’ve enabled the nice URLs for images now on our site. So glad I read this, looks a lot better. Thanks again, Brendan.
        I also asked them about the flex zones and apparently it’s only worth the change if your traffic mainly comes from Asia or Australia. So for me it doesn’t make too much sense.
        One comment about your Cloudflare tip: WP Engine changed the way they count bots a few months ago so I think the benefit is not that huge anymore. I think the WP Engine figure used to be 20-30% more than Google Analytics, now it’s less than 10%.

  • Michael Michelini

    Reply Reply February 13, 2016

    Hi Brendan,

    thanks for this amazing post! i’m on WPengine now and most of this is enabled. I’m on the personal plan, so will upgrade teh $20usd/mo more for the CDN as I do believe it is worth it.

    My worry though is – I have an SSL now – but I think not the wildcard SSL, so if I have cdn .hostname .com would it cause unsecure image popups or break my single subdomain SSL? which i believe is the case and therefore should upgrade to a wildcard SSL – via namecheap, and get off the current SSL with WPengine?

    Hope this is clear – and thanks again for this amazing article! 🙂

    • Brendan Tully

      Reply Reply February 15, 2016

      OK so without the wildcard SSL cert you can use the CDN but it will be at a netdna domain like the wpcurve example further up.

      You need the wildcard SSL cert if you want to use the custom domain name for the CDN, eg https://cdn.michaelssite.com

      I think namecheap is quite a bit cheaper than WPE for the SSL cert.

      That’s quite a bit of cost you’re adding ~$300USD/year. I’d do Cloudflare first and do a speed test and see how that goes. Depending on the theme the site uses you might find that the site already loads lightning fast, e.g. ~1 second. That said, the CDN will help smooth the speed if you’re getting a ton of traffic or big traffic spikes.

      • Michael Michelini

        Reply Reply February 17, 2016

        Thanks again Brendan for the tips and help, amazing!

        So as a followup on my side – been going through tech support with WPEngine – I am just trying to buy the wildcard SSL for 199usd/year through them to make life easier – but because I have cloudflare on it won’t see the IP

        But I turned off cloudflare (turned the orange cloud to gray) but their system still doesn’t see their IP?

        Anyway, this is why your service rocks and clients want you to deal with this!

        • Brendan Tully

          Reply Reply February 17, 2016

          Yeah with Cloudflare, when you have a full SSL cert you need to change the SSL setting from Flexible to Full to work properly. Even though you disabled the cloud icon they’ll probably still handle the SSL routing. I think it will only disable fully if you set cloudflare to paused.

          It can get a bit technical as you have a lot of moving parts when you introduce Cloudflare, I think you have me on skype or at least Facebook so if you get stuck, ping me and I’ll take a quick look for you

          • Michael Michelini

            February 18, 2016

            thanks buddy,
            all is solved – in the discussions with their customer support – they had me point the cname to a maxcdn site – but when i had to setup SSL later, then i had to change that to their IP – order processing now!

Leave A Response

* Denotes Required Field