How can I automatically redirect custom pages from this URL
to this URL
In order to avoid problems with Google Search Console?
For that, you need to change some configuration on your Magento admin.
System > Configuration > General > Web > Url Options > Add Store Code to Urls = No
It'll remove store codefrom url. I hop it'll help you for what you want.