Site icon Hip-Hop Website Design and Development

Make a post inaccessible without a unique ID in the URL

I created a custom post type to build and send proposals.
I protected the posts with password, the password being the email address of the client (value of a custom field).

Even if this is already a pretty good protection, the posts can still be guessed by anyone. Especially since the URL structure is site.com/mycustomposttype/12345 (12345 being the post ID).
I’d rather have the posts completely unfindable by anyone who doesn’t have the direct link.

I managed to create a function that generates a custom token on post creation and saves it in a custom field of the post.

Is there any way to make the post only accessible (with password) via the URL+token ?

Of course that means the post would be completely inaccessible (404?) via the normal url (even with password).

Another solution would be to modify the post url structure, adding that unique token at the end. But my fear is that would make the url+token findable, by Google for example.

Thank you in advance for any input!