How to Avoid Bad Requests?

June 20, 2020 | 04 min read

1. Quickread

When a bad request is called then the browser will keep waiting for this.Tools like GTmetrix will also keep waiting for around 20 seconds before giving up.This will result in total page load time going higher.
Many times users get an experience with a broken link or “404 page not found error” on certain pages. It’s really very harmful for your site as users get annoyed by seeing that as users will not get the things from your site that they want to see or buy from your site and they get very bad experiences on your site because due to these “broken links” or 404 error, page takes more load time and results it shows 404 page not found.
On some of the shopify sites we have observed that due to app or third party banners like that of Paypal we get bad request.
So in this Article, you will get an idea what is a bad request? How you can find this and how you can avoid bad requests during your shopify site speed optimization.
404-links

2. What is a bad request?

When users click on any file or image on your website and its redirect to ‘404’ page or broken links. “Why does this error occur on site?” Because a requested html file or image doesn’t exist, there are many reasons that image or file are not on site might be deleted from site, or changed the name or you moved it. And when this image or HTML files are not there, it will take more load time because the thing being requested isn’t there.
e.g. when a requested page doesn’t exist. In this case, you’ll get the familiar “404 page not found” error.
404_error
404 errors or broken links on your website, and if these bad requests are more then it will slow down your site and unnecessary requests that lead to a bad user experience. So it’s necessary to find the bad requests from your site and fix the broken links.
Some tools are there to find the broken links available on your website. Using that you can get all the links which are broken or contain 404 errors.

3. Where to see bad requests?

You can use page speed testing tools to find broken links of your site.
  • GT Metrix
  • Pingdom
  • Google search console
These tools will show all the page urls where broken links or 404 errors are on page.
gt_screen_avoidbadrequest
From the above image, you can see that some requests are returning 404/410 responses. You can either fix the broken links, or remove the references to the non-existent resources.

Google search Console

google_search_console
This page will display any crawl errors that the Google Search bot experienced while trying to crawl your site. It’s good to stay an eye fixed on this page just in case that any errors do occur which may then be properly handled either by fixing the link or removing it entirely.

4. How to fix bad requests?

It’s very easy to fix the bad requests as speed testing tools are giving all the “broken links” or 404 error pages urls.So you just need to track that urls and change it or delete it.
If you find you have one or more, just remove the code that is calling the resource, or replace the missing resource. E.g. you can replace an image with one that works or just remove it.

5. Conclusion

If lots of broken links are available on site then it will call unnecessary resources to the site and slow down your site. So it’s very important to find the bad requests of your site and fix them as early as possible to make a good user experience, to improve page score and to better site ranking.

Latest Posts

Leave A Comment