How to Fix Magento 2 Homepage 404 Error
The Magento Homepage 404 Error mostly occurs when you upgrade Magento to the latest version or do a fresh install. Considering the importance of the homepage, it is important to fix the issue right away. After all, the homepage is the digital front door to your store. It provides an overview of your store, the products, and more. But don’t worry since it is quite easy to fix the error. Here’s how to do it.
Fixing Magento 2 Homepage 404 Error
There are two different ways to fix the error.
Incorrect Page Setup
The most likely reason behind the Magento 2 Homepage 404 Error is due to incorrect page setup. To fix this issue, go to your Magento 2 Store Admin Panel > Stores > Settings > Configuration.
Now, head over to the ‘Web’ section and expand the Default Pages tab.
Ensure that the CMS Home Page is pointing to the correct webpage.
Now, click on ‘Save Config’. Now, clear the system cache and then refresh the homepage. 9 times out of 10, this method fixes the homepage 404 error. If you are still encountering the error, then let’s try a different method.
Read More: How to Clear Magento 2 Cache – A Step by Step Guide
URL Rewrite Issue
There’s a possibility that the homepage may be not loading due to a URL rewrite issue. The reason is there’s an entry in the url_rewrite table with a blank request_path. It may cause Magento to misinterpret, leading to the homepage 404 error. To fix this issue, head to your Magento database. Now, run the following command:
SELECT * FROM url_rewrite WHERE request_path='';
This will help you identify all possible entries with a blank request_path. Now, enter the following:
DELETE FROM url_rewrite WHERE request_path='';
This will remove all the entries with blank request_path values. Do note that it is always a wise decision to make a backup of your database prior to making any changes. while the above commands are unlikely to disrupt your store, there’s a possibility of accidental loss. Thus, backup is recommended. Now, flush the cache and reload the homepage.
Final Thoughts on Magento 2 Homepage 404 Error
Despite trying both the methods, if your homepage is still not showing up, it will require a more careful inspection. You can reach out to the FME support centre and our team will get back to you promptly.
Read More Magento 2 Blogs:
This blog was created with FME's SEO-friendly blog