I am working on a site that shows content for cities, neighborhoods, zip codes, etc.
Each page is created dynamically.
My site does not have a static page for miami.
When user types http://example.com/miami the server thinks it is a 404 and executes my 404.php.
In the 404.php I capture the word after the website url (miami, 33101, etc) and then I show the relevant content.
From a user experience perspective, the user does not know that the server thought it was a 404 error.
I am now concerned with SEO.
My site has links to my target locations. For example, in the homepage I have links to the top 10 destinations.
When the search engines crawl my site, they will find the links to those destinations. When they go to those links, I believe the server will return the 404 header. Even though the 404 page will have relevant, rich content, I believe the search engines will think it was a broken link and penalize the site.
Am I thinking about this the right away?
Should I stop using the 404 page to show content and find another way to (redirecting?) to show the dynamic content?
I am overriding the 404 header with a 200 header. When I inspect the headers it shows 200 OK.
Does it mean I can continue to use the 404 page to display my content, or there is another way the robots can tell it was a 404 page?