I am hosting a site using the New Google Sites, which has recently added a search functionality. I use web address mapping, so instead of https://sites.google.com/domain/site/page, I can direct my visitors to https://www.domain/page, which is great.
However, search results on the search results page, https://www.domain/_/search?query=term, open https://sites.google.com/domain/site/page, which I don't like.
Is there an option to change that, or can I make Google Sites redirect to the mapped web address?
If nothing else works, can I disable the search functionality?
Remember, I cannot simply use the answers given here because I can embed JavaScript only in an iframe that is not allowed to navigate the top frame:
Unsafe JavaScript attempt to initiate navigation for frame with URL 'https://sites.google.com/s/...' from frame with URL 'https://...-sites-embeds.googleusercontent.com/s/embeds/code/inner-frame-minified.html?jsh=...'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set.
Uncaught SecurityError: Failed to set the 'href' property on 'Location': The current window does not have permission to navigate the target frame to 'https://example.com'.
I cannot even access the top frame's URL:
Uncaught DOMException: Blocked a frame with origin "https://...-sites-embeds.googleusercontent.com" from accessing a cross-origin frame.
I cannot even show a link to the real site based on whatever I think is a variable allowing me to guess on which domain we are as <a target=_top
is blocked by the iframe
s' sandbox
property...