2

I am trying to create a custom domain name (already acquired) for an MS Sway site of the form sway.com/<id here>.

The domain service provider uses a dummy page with iframe to display the contents of the actual page as well as to show a ghost domain name in the address bar. It seems sway.com server used to allow this but now is setting X-Frame-Options to SAMEORIGIN and hence the iframe displays nothing.

Has anyone succeeded in doing this or any other way to display a custom domain name for a Sway site?

1 Answer 1

4

You have to use: https://sway.com/s/{swayId}/embed instead of: https://sway.com/{swayId}].

For instance, you can embed your sway in the index page of your website the following way:

<!DOCTYPE html>
<html lang="fr">
    <head>
        <title>Your title</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    </head>
    <frameset rows="100%">
        <frame src="https://sway.com/s/{swayId}/embed" frameborder="0" marginwidth="0" scrolling="no" noresize="noresize"/>
    </frameset>
</html>

You can of course replace the frame by an iframe:

 <iframe src="https://sway.com/s/{swayId}/embed" frameborder="0" marginheight="0" marginwidth="0" max-width="100%" sandbox="allow-forms allow-modals allow-orientation-lock allow-popups allow-same-origin allow-scripts" scrolling="no" style="border: none; max-width: 100%; max-height: 100vh" allowfullscreen mozallowfullscreen msallowfullscreen webkitallowfullscreen></iframe>
3
  • Thanks, but neither the regular frame nor the iframe option works when the actual sway domain name is hidden to show the custom domain name.
    – sm535
    May 9, 2018 at 6:44
  • Here is an example of website built with Sway and using domain masking: aufauvre-architecte.com. What do you mean by "does not work"? May 15, 2018 at 13:20
  • Works fine for me with an iframe May 9, 2020 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.