How to Fix Magento 2 Homepage 404 Error
Magento 2 Homepage 404 error is commonly reported by merchants after a fresh installation of Magento or an upgrade. In this post, I am going to share a working solution for Magento 2 Homepage not found error.
The homepage is an important page of any online store. It acts as a medium for visitors to learn more about your business before they become customers. The Magento 2 homepage 404 error can affect the conversions in your online store and directly affect the revenue. The SEO impact of a 404 error on the Magento 2 homepage can not be just ignored.
In case you’re facing the Magento 2 homepage not found an error in your live site, fix it immediately.
There can be mainly two reasons your Magento 2 homepage is throwing the 404 error:
Let’s see the complete step-wise method to solve the homepage 404 error in Magento 2!
Method to Solve the Magento 2 Homepage 404 Error
Try each of the following methods to fix the Magento 2 homepage not found the issue.
Incorrect Page Setup
The probable reason for Magento 2 homepage 404 can be your store configuration pointing to a wrong CMS page.
Follow these steps to set the correct CMS page for homepage:
- Log into Magento 2 admin panel.
- In the left panel, click Stores > Settings > Configuration.
- Go to the Web section, and expand Default Pages.
- Make sure that CMS Home Page points to the correct page.
- Click Save Config.
Flush system cache in System > Cache Management and check if the homepage still shows the 404 error.
The problem will be solved if it was due to wrong CMS page selection in the configuration.
If the Magento 2 homepage 404 error still persists, then it can be because of URL Rewrite issue.
URL Rewrite Issue
The homepage (with blank request path) may be pointing to a non-existing target path.
You can fix Magento 2 Homepage 404 Error by deleting the entry with blank request_path
in the url_rewrite
table.
- In the Magento database, open the
url_rewrite
table. - Run the following SQL query to find the entries with blank request path:
1SELECT * FROM url_rewrite WHERE request_path=''; - Delete the entries by using the followng SQL Query:
1DELETE FROM url_rewrite WHERE request_path=''; - Finally, flush system cache.
Ta-daa! The Magento 2 homepage will start working again.🥳🙌
I hope you’ll find the above solution helpful to fix Magento 2 homepage 404 issue. Check the CMS page configuration, and correct the URL rewrite in the database to fix the Magento 2 homepage 404 error issue.
In case you are still facing the problem, feel free to comment. I’d be glad to help you!
Thanks for reading. 🍀
Related Post:
Mahetab Saiyad
He is a Magento developer, who loves sharing technical tips and solutions. Being a coding enthusiast, he keeps exploring new concepts!
Prev
The Definitive Guide to Google Rich Snippets for SEO [2024]
Monthly Recap: Meetanshi Launches & Updates – May 2023
Next