For now only if im entering page id which doesnt exist I get the 404 page.
http://EXAMPLE.COM/?page_id=51573
But its not redirecting to 404 page if im going to http://EXAMPLE.COM/blablabla
is that possible to redirect those kind of addresses to 404 page in wordpress?
You’ll have to create a
.htaccess
file and upload it to your WordPress root directory. In your.htaccess
write the following:In your WordPress dashboard go to
Settings > Permalinks
there you choose the structure you’d like. In your case this would be postname.