0

I have successfully embeded an iframe in Wordpress (via Elementor) that displays a Unity3D game. The game is located in c-panel > file manager at: https://wordpress-staging.zafflower.com/SummersDay_020923/index.html. However, this is a staging site and I would like to have the Unity3D game in a different folder: https://public_html/SummersDay/index.html. When I copy or move the game to the new folder I get the error message: 'public_html’s server IP address could not be found.' I have tried changing the permission on the SummersDay folder from 755 to 750 which is the same as the permission on public_html, but that doesn't work. I have also tried making a new folder outside of public_html and giving it a 750 permission but that doesn't work either. My Wordpress site is hosted at HostGator. Is there something that HostGator has to do on their end, or can I do something to fix this? See iframe code below that works and iframe code that doesn't work. Any help will be much appreciated. Zaffer

This iframe works:

<iframe src="https://wordpress-staging.zafflower.com/SummersDay_020923/index.html"
width="1200"
height="900"
frameborder="0"
margin="0"></iframe>

This iframe doesn't work:

<iframe src="https://public_html/SummersDay/index.html"
width="1200"
height="900"
frameborder="0"
margin="0"></iframe>

Addumdum: Here is a JPG of the file paths of the two instances of the game. I am using what I think are the correct paths.

enter image description here

1
  • We’ll you second example isn’t using a valid URL. You’ve left out the domain. Commented Feb 22, 2023 at 0:36

1 Answer 1

0

Thanks Jacob, I didn't realize that iframe could only reach an address that included a domain, not just a file path. I solved the problem by creating a subdirectory, games.zafflower.com, and installing a new WordPress site in that subdomain. Now this iframe code will correctly display my Unity3D game. Thanks! Zaffer

<iframe src="https://games.zafflower.com/SummersDay/index.html"
width="1200"
height="900"
frameborder="0"
margin="0"></iframe>

enter image description here

Your Answer

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

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