Tag Archives: web developer agency

The 8 Biggest SEO Misconceptions of Hreflang Implementation

The 8 Biggest SEO Misconceptions of Hreflang Implementation

There are a number of excellent tips on how to effectively geo-target sites, but there is one of the best methods is to use the hreflang element. Unfortunately, there is still so much confusion around, which caused some serious errors on many sites. In fact, more than half of them had some sort of problem with the code implantation, and it must be due to lack of understanding of hreflang fundamentals.

Therefore, in this article, we would like to give you the 8 misconceptions that often mislead many web developers and SEO services agency. So, if you are working in those fields, you’d better read the following points, and hopefully, after reading the points below, you can understand the right concept for understanding and applying the hreflang in your SEO strategy.

Misconception 1: You only Need Hreflang on the Home Page of the Site

Some people prefer to put hreflang tags in a few sites on their home pages. Unfortunately, Google’s sample code only displays the home page version of a URL which makes some interpreting only needed on the home pages. Many SEO professionals said that Google was smart enough to figure it out. All you need to do is just give them the template and they will understand.

However, Google cannot understand the client’s wants, that’s why in most cases, it will show the incorrect page in the local market. Therefore, you need to add the hreflang element to any and all pages that have an alternative version included in an xml site map and not just home pages.

Misconception 2: You only Need Hreflang on Dot-Com Domains

Some developer teams are arguing if it is possible to develop a solution to map pages across different top-level domain. They think that once they use ccTLDs like .co.uk, the search engine would understand what country they are targeting. This is why you need to do a test to make sure that it is understood and that no other local sites are ranking in the market. Also, it is strongly recommended for you to use the hreflang element for any page that has an alternative, no matter what domain it is on. Besides, enterprise hreflang XML tools can map the URLs regardless of what domain they are on. Furthermore, you can also host the XML sitemaps for all of the different sites in the same location which makes maintaining them much easier.

Misconception 3: You can only use the X-Default on the Home Page with a Country Selector

Another opinion came from a few SEO pros that said the x-default could only be used when you have a home page that has a country selector which can only be used on this page. This statement is almost right, but actually, there are two specific applications of the x-default. For instance, sites like FedEx or Ikea present a splash page with a language and/or country selector asking the visitor to choose which location and/or language version of the site they want to visit. Since this page does not target any specific language or country, the x-default would tell search engines to present this page in any market that does not have the assigned page. The wrong part is when the SEO pros state on how to handle older and large multinationals, especially those in the United States, a place which the main dot-com site is often used as both their global site and their U.S. site. So, in this situation, you should also use the x-default.

Misconception 4: Regional Sites Cannot Use Hreflang Element

People usually use regional sites to target multiple countries in a region using a single language site. The most common of these regions are APAC for Asia Pacific countries, LatAM for South and Central American country regions, or MENA covering Arabic speaking Middle East countries and North Africa.

You can also use the hreflang on a regional site in some ways. The first method is by setting the regional site to a common language which is most commonly done with an Arabic language site.

SEO Tactics

Another way is to tag the same page for multiple countries. Usually, sites do this when they already have a designated language site, multiple local sites in the same language, and want this version to be visible in specific markets rather than the x-default or language version.

In this approach, every language market will list the element that you are targeting.

SEO Tips

Misconception 5: To Save Lines of Code Add Multiple Codes to the Hreflang=Syntax

Some people think that the application can cut down on the number of XML sitemap entries by adding multiple countries and language codes to the syntax.

SEO 2018

The fact is this is not working, since you must create a separate URL element for each URL and Google has been very clear about this.

Misconception 6: You Should Set Your Rel=Canonical to the Global Site

This is totally wrong as doing so will remove your local language pages almost as fast as blocking them with a robots.txt entry. In fact, this might be one of the biggest mistakes that many companies make, related to hreflang other than incorrect country and language codes. Most make this suggestion in the context of removing duplicate content. The hreflang element essentially does this for you.

Therefore, the right answer is to point to the local language page it is on and never point to any other page unless you want the page to be blocked. This makes no need for hreflang tag to be on the page. For example:

SEO Techniques

Misconception 7: You can combine Hreflang and Canonical Tags

This mistake is probably the most common one that often happens. In many cases, developers often try to combine the canonical and self-referencing hreflang element into a single tag.

In this case, it was the page for Ireland English.

SEO Practice

Therefore, as a solution, you need to make sure that the rel=canonical must be its one entity as must the hreflang element for the page. For that reason, you cannot combine them under any conditions and the correct entry should be like this.

Best SEO Practice

Misconception 8: The Rel=Canonical Can Serve as the Self-Referencing Entry

The source to support this concept is still hard to find, but it is completely incorrect. Below is an example of this mistake when referencing the Argentina Spanish page.

New SEO 2018

As stated before that it is incorrect; therefore, you must use hreflang element for the self-referencing element. In fact, if the hreflang tags are on the local pages, they should look like this:

SEO Tactics 2



We have to admit that hreflang is one of the most complex technical issues SEO pros must deal with. Unfortunately, there are lots of incorrect interpretations that you can find anywhere. So, take a moment before you tackle your hreflang implementation to think about what problems you are trying to solve and be careful whether these changes can cause new problems or not.

3 Techniques that Minimize Downtime


Since users keep on expecting a stable and reliable service, many web developers and system admin attempt to create infrastructures that are more reliable and able to minimize downtime. In fact, minimizing downtime is necessary for increasing customer satisfaction and decreasing support request. Below, we provide you with three areas that are crucial when it comes to downtime and we also offer some improvements that you can apply on them. Check this out!

  1. Monitoring and Alerts

Nothing works better than properly monitoring your infrastructure. In this way, you can discover any issues before they really appear and affect your customers.  Furthermore, monitoring infrastructure will also aggregate and retain a record of stats such as application performance metrics, and system resource utilization. So, the main purpose is to look for anything weird.

Usually a client is interacted on each host that collects metrics for monitoring, and then reports back to a central server. These metrics will be stored in a database and available for many services like searching, alerting, and graphing. Fortunately, there is software that can help you monitor your infrastructure, such as:

  • Graphite

Graphite provides an API that has the support of dozens of applications and programming languages.  On the other hand, metrics are pushed, stored, and graphed in the central Graphite installation.

  • Prometheus

To pull data from a variety of community supported and official clients, you can use Prometheus. It has an alerting system that is built-in and is highly scale able. Besides, it comes with client libraries for several programming languages.

  1. Software Deployment Improvement

Believe it or not, software deployment strategies are one area that plays an important role on your downtime. Unfortunately, many people often overlook it.

Bear in mind that having a complex deployment process will result in the production environment leaving the development environment behind. This can cause any risky software releases since every deployment is a much larger set of changes that naturally brings a much higher risk of problem arising. No wonder this process can easily lead to numerous bugs that can slow down development and cause the unavailability of resources.

Therefore, the best solution for this situation is to set up some up-front planning. In order to sync your production environment with your development environment, you have to figure out a strategy that allows you to automate the workflow, code integration, deployment, and testing.

Here are some best practices regarding the continuous integration and delivery (CI/CD) and testing the software that help you start automating deployments:

  • Maintaining a Single Repository

To make sure that every person on the development team works on the same code and can test their changes easily, you can maintain a single repository.

  • Automating Testing and Build Processes

Don’t forget to automate your development and testing as this will simplify deployment in an environment similar to the final use-case. Besides, you will find it helpful, especially when debugging platform-specific issues.

  1. Implementing High Availability

Another strategy that you can apply to minimize downtime is to use the concept of high availability on the infrastructure which includes principles used in designing resilient and redundant systems.

In this case, the system should be able to detect and analyze the health of the system; it has to know precisely where the error is located. Furthermore, the system must be able to redirect traffic as this can help minimize downtime through reducing interruption.

In order to upgrade to a highly available infrastructure, you have to move to multiple web servers and a load balancer from a single server. The load balancer will show you regular health checks on web servers and routes traffic from those servers that are failing.

Moreover, you can also add resilience and redundancy to increase database resilience using database replication; surely, you will find different database models on different configurations of replication. However, many believe that group replication is the most interesting one, as you can read and write operations on a redundant cluster of servers. In this way, you can detect any failing servers and routing done to prevent downtime.

In conclusion, there are three areas that can lead you to less downtime. If you truly put attention on them, you will have happier clients and of course this will lead you to more revenue.

How to Automate WordPress Plugin Testing Using Codeception

Many web developers get excited and thrilled at the same time when it comes to releasing a new update to one of our plugins. They are excited since there are more features and improvements to be delivered to customers, yet, this also means starting of another round of manual and rigorous release testing. Therefore, you should know the best way to improve this testing process and one option is automation. In this article, you can reveal how to implement it, so make sure that you read all of the sections in this article.

Release Testing Relay
Since there is a 3-person testing relay, usually we approach release testing. You have to ensure that your current set up involves a Google spreadsheet for each product with worksheets for each of the plugins and addons. Each sheet has lots of test scripts to perform, covering the functionality and edge cases for the plugins.

The first person will run the scripts and look for any issues. If an issue is found, then the test is considered as a fail and raised on GitHub to be fixed. Once the first person has finished and the issues have been fixed, the next person in the relay can start their round of testing. This process will be continued and repeated until there are no bugs found. Hence, this test will surely take lots of time and cost.

The testing process above includes unit tests that use PHPUnit and run by Travis Cl every time code is pushed to our GitHub repositories. Even though it is highly automated and able to catch issues with code before the release testing stage, we still need real people to test it, as unit testing is only a small part of the big testing puzzle.

Codeception is better known as a behavior-driven testing framework that automates acceptance, functional, and unit testing. Similar to Behat, codeception is also written in PHP, the test is clear and very descriptive.

Although there are only some elements that can be clicked and it doesn’t handle JavaScript interactions, by using the WebDriver module, your acceptance tests can be run.

At the first time, you may find that setting this up can take much time, but after it ends, you will discover that writing tests is so much faster.  Like PHPUnit, we have Codeception installed in our repository using composer:

Aside from that, we also install WPBrowser, a set of WordPress extensions for Codeception. This extension provides helpful methods allowing the test ‘actor’ to interact easily with a WordPress site.

It is better for you to roll your own bash script to set up everything needed to run your acceptance tests, instead of using the WPBrowser’s WPLoader module to set up the test WordPress site. The script applies WP-CLI and includes:

  1. Installing WordPress in a tmp directory inside your repo (.gitignored of course)
  2. Build your plugins from source and install them on the site
  3. Download either PhantomJS or Selenium and fire it up to be used by the WebDriver module.
  4. Run Codeception tests
  5. Shut down PhantomJS or Selenium
  6. Kill any Firefox instances

You can find more requirements for the projects with detailed installation steps in the README.md. After everything is installed, you can fire up the test by running sh run-tests.sh.

The Scenario
The main test file, known as a ‘cept’ is a file that contains all the steps and assertions for a given scenario. The scenario is to test the core functionality of WP offload S3 Lite – upload a file to the WordPress Media Library and make sure that it gets offloaded to S3:

The steps are very understandable and show clearly the process that show what an actual tester would do, such as login, add a file to the media library, ensure that the URL is rewritten to an S3 URL, then check with AWS to find out if the file has been uploaded.

In conclusion
As it is stated above, you will need a hard work to get this all set up. Remember that the scenario above only for a single site install of WordPress. Therefore, a custom database module for Codeception is needed to make switching between databases and installs during testing as convenient as possible.

You also require script maintenance as code and product usability changes over time. Hence, the best solution is to replace two out of the three of your human testers with automated tests using Codeception. This will surely give more advantages to your release testing process.