Updated: Sep 14
About 404 Error Pages
There may be times where you share a dynamic page URL, code navigation to a dynamic page or select a dynamic URL for a button. You know the record exists in the database but imagine you suddenly find a 404 error message when attempting to open that page! Sometimes this may happen to you on a regular Wix page. Here are some tips on what to check for to fix this problem.
Good to Know #1
Dynamic Pages - Check the URL Pattern
If you have created a dynamic page from a database collection, make sure you created a valid URL pattern for your dynamic page. For example, if your collection is called "category", then Wix automatically pre-fills the URL pattern with the name of your collection and the "Title" field.
If you delete the "Title" field or leave it empty, then this will break your connection. You must have at least 1 text value before your first field variable. (More on URL Logic below.)
Good to Know #2
Dynamic Pages - Check the URL Logic
Make sure that your URL pattern has a unique logic for every single item in your database collection. Select a field, or multiple fields, that will create a unique connection.
Single Item Pages
Look at the example fields we have in our tutorial database collection. You will see that the "Movie Name" field is the best choice to create a unique URL. If we were to choose the "Genre" field then you will receive a 404 Error because the website won't know which item to display since there will be multiple matches with the same exact words.
Another reason you could be receiving a 404 Error on a dynamic item page is if you selected a field that was blank and has no value. For example, in the image below the "Title" field is left blank. If you are collecting data for this field via a custom form or other custom method, make sure that the field value is required or validated to ensure it is not left blank or deleted in the future.
Using the same examples in the picture shown above. You will see that the "Movie Name" field is NOT the best choice to create a unique URL for a group or a category of items because every single item has a unique Movie Name. Some good choices for a group or category URL would be "Genre" or "Subcategory" since there are multiple items that share the same value in a common field.
Good to Know #3
Dynamic & Regular Pages - Check Capitalization
If you are receiving a 404 Error on a regular page from a button click or a code redirect, please make sure you are typing the URL correctly. URL's are case-sensitive, which means even a capital "A" really does matter.
Attempted URL: www.codequeen.co/Guides
Actual URL: www.codequeen.co/guides
Regardless of what type of page you are trying to display, make sure that you check the spelling and capitalization of all words.
by Code Queen
Stuck on a project? Need help on finding other workarounds? Hire Code Queen, LLC! Schedule a phone call or video call directly online. In a different time zone? No problem! Code Queen currently has clients around the world.
Online Booking: Discovery Session
Contact Form: Send project details