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?

3

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>
| improve this answer | |
  • 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 '18 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"? – Jean-Alexis Aufauvre May 15 '18 at 13:20
  • Works fine for me with an iframe – Thomas Levesque May 9 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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