How to find errors in AMP pages and how to fix them
How to find errors in AMP pages and how to fix them?
Many bloggers lose a lot of their mobile traffic and rankings due to errors in AMP pages. In this article, you will learn how to find the errors that come in the pages and then how to fix errors. These tutorials are for the WordPress platform, yet valid for other platforms as the process is similar.
We have published an article earlier on the subject of AMP, before reading this article, I recommend that you go through it once.
Even after setting up AMP, many times, due to plugin updates or due to many other reasons, errors can come in your AMP pages. If you do not fix errors on time, then you will definitely do your AMP traffic loss, because Google does not rank with errors in its search engine results. So, in such a situation, it is very important that if you find out that there is an error. then by finding that error, correct it.
How to find errors in AMP Pages?
Let's first know how to find errors in AMP pages.
You know about errors in AMP pages in two ways. First way: if you use Google Search Console (Google Webmaster Tools), then you will know that if there is an issue on your website or any of its pages, Google will email you and inform them about it and then you can take your action on it.
In such a situation, even if Google tells you the error exact form, but still, you have to understand it completely. Google does not tell you one more thing instantly. First Google takes time in error detection and then emails you after a few days.
AMP is a very dynamic project with some bugs very soon. By the way, there are also some plugins available, Therefore, the main recommends using Google's official validator tool for error detection, by not recommending any plugin to you.
How to find errors in AMP pages with Google AMP Validator?
So let's know how you can find errors with Google AMP validator
Do Google Search, "AMP Validator"
Within the search results, the option of Test and preview your page will come in front of you like the screenshot given above. You have to put in it the URL of your page that you want to check. Keep in mind that do not forget to put / amp / at the end of URLs of all pages, otherwise, this tool will show the error of Not Valid.
After entering the URL, click on the Run Test button. After that, it will start analyzing your page.
If there are no errors in your AMP pages, that is, your AMP page will be valid, such as the AMP homepage, then you will show like the screenshot given below.
But if there will be errors in your AMP page, then you will have a count show of errors, as you can see in the screenshot given below:
It will tell you in full detail what is the error and what is the error, then according to that, you can correct it. Most errors are usually prohibited HTML tags. That is, those errors come when such tags are used in your AMP pages, which is the mind to use according to the rules of AMP
So, you can fix the errors by removing those tags accordingly.
Similarly, if you use Search Console or Google Webmaster tools, it also informs you about errors, as shown in the screenshots below:
The above screenshot is taken from the messages section of the website in the Google Search Console and the below screenshot is taken from its new beta version, in which it shows the errors in detail:
How to fix AMP errors?
After each issue, there will be a help link in the name of Find out more about this issue. You can know how to fix this particular error by going to this link.
In WordPress, if there are same errors on multiple pages, then you can fix them in one go. There are some plugins available for this, such as AMP for WP - Accelerated Mobile Pages
plugin Given many options to, you can fix errors, if you use this plugin to set up pages on your website, then the first thing is that there are very few chances that you will have errors in the pages of the WordPress blog.
Now see how I will not be able to tell you in this post how to fix each different type of error because errors can be very different, and their solutions are also different according to the setup of your WordPress blog.
But I can definitely tell you a solution to a common error. If the error is of an HTML tag that is invalid or not allowed, then if that tag is displayed. nothing is so important, then you can use CSS to show it on the page. It can prevent from.
I assume that you used the above-mentioned plugin to configure pages. So, go to the configuration window of AMPForWP.
Then go to Design> Global.
apply your CSS.
It will have a box of custom CSS under the Advanced section. In this, you can apply your CSS.
To hide the elements which are causing the errors, you can hide them using the display property of CSS using their HTML selectors.
Its HTML selector is hidden using the display property. because in, a social media plugin called Monarch was not allowed in the AMP page and was causing an error.
This resolved the error encountered in the page.
The syntax of its CSS code is:
You just have to write the selector of the element that you want to hide in place of the selector.