7 Simple Ways to Fix a Slow Loading Website
Don’t you just hate it when the website you want to visit takes forever to load? And no, this isn’t because of your Internet. It’s really because the website has content that may be poorly optimized.
Improving a websites speed doesn’t take very long and can provide numerous other benefits such as Page Rank and a better user experience.
Here are 7 simple things you can do to Fix a Slow Loading Website.
Make Sure Images are Optimized for Web
Over-sized images can be a major culprit, and that’s because your website may be full of images which are more than 10MB in size.
Rule of thumb for image size is they shouldn’t exceed 1MB.
You can save precious loading seconds by compressing them before uploading to your site.
You can do this by compressing your images using Photoshop (Save for Web option) and using PNG/JPEG/WebP as file format for better image compression.
If you don’t have Photoshop, you can use Gimp. Gimp is a free image tool that’s like Photoshop. It also has an export option to save in compressed formats.
Avoid large background images or even videos in your page headers. These may look cool but can cause heavy load times especially if not optimized properly.
Make sure your images are scaled properly. The overall dimensions of the image shouldn’t exceed where the image is being placed on the website.
- Use compressed formats such as: JPEG/PNG/WEBP
- Under 1MB in size
- Use properly scaled images
- Avoid large image or video headers
Enabling website caching especially on larger files can improve your website loading.
If you use a CMS such as WordPress, you can install cache plugins which will let you enable either site-wide caching or caching of specific site elements.
- Use a CDN
- Setup client cache and expire times
Less Code is More
Sometimes your website’s source code may contain unnecessary elements which will increase loading times.
If you use a CMS such as WordPress there are plugins which can optimize the code for you.
Depending on your coding knowledge, you can also manually edit the source code to make it more optimized.
Test your Website Speed
You can use Google’s PageSpeed Insights test to see how your website is doing.
Open your website in Google Chrome.
Then Press F12, check the console for any error messages and use the audits tab to run the PageSpeed test.
The Page Speed test will also offer suggestions that you can use to increase your website speed.
Avoid Multiple Redirects
You can check for multiple redirects using Google Chrome.
Press F12 to open Chrome Dev tools.
Then go to the network tab and check the preserve log option. Refresh the page to see all the requests.
Each row is a request. Look in the status column for 300s (redirects).
If you click on the row, you can see the header info to see why there is a redirect.
One or two redirects are ok but if there are numerous redirects, try to eliminate as many as possible.
Check for DDoS Attack
If your site is already optimized and you find it is suddenly running slow, you might be under a DDoS attack.
You can check your server access logs to see if there are lots of unusual requests.
To mitigate against DDoS attacks, you can add a firewall that blocks specific requests or multiple requests from the same IP.
Another solution is if you have nginx, you can limit the number of requests per IP. Here is a great article that shows how to setup this up. Mitigate DDoS Attack using NGINX.
Use a DDoS mitigation service such as Cloudflare that offers DDoS protection. These services block bad requests especially when a DDoS attack is detected.
Check for Server Errors
Check server error logs for any errors that your website is generating and resolve these.
There may be requests to images and other resources that are not found.
You can check your server logs using your host control panel.
Chrome Dev Tools is also helpful here. Check the network tab for any status codes with 400s (not found errors). They will be highlighted in red.
A slow loading website can be caused by various factors such as images that are not optimized, not utilizing caching, and code errors to name a few.
Google prefers fast-loading websites, which is major factor in page rankings.
If you found this article helpful, please consider sharing it!
After trying all of the methods in this article and you still were not able to get your website to run as efficient as possible, please contact us and one of our experts will help you.