Thank you Lester for helping the community.
This I found in a review about custom post types.
Help! I’m getting a 404!
If you’re getting a 404 message when trying to view a post, don’t worry. This is supposed to happen when setting up new post types. The easiest way to fix this is to simply visit your Settings > Permalinks page. You don’t have to save your permalinks but just visit the page. This will flush your rewrite rules.
If you’re a plugin author, you can save yourself some support questions by flushing the rewrite rules on activation of your plugin.
source: https://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress