I have been trying load a visualforce page using an iframe on an external company website. I have followed all the documentation to the best of my ability without luck. I understand that I must use Lightning Out and at a minimum there should be three files. Using a simple "Hello World" component here is what I have so far. I can not seem to get past first base with this - which to simply preview the app. Help would be awesome. I have spent a few days on this. Although I'm only a lowly admin I do have years of experience in building web apps with php and Mysql - So none of this is over my head - I hope. Thank you in advance for any help you can offer.


<aura:application access="GLOBAL" extends="ltng:outApp" 
<aura:dependency resource="c:myAppComponent"/>


<h1>Hello World</h1>


<apex:page >

<apex:includeLightning />

<div id="lightningLocator">

$Lightning.use("c:myAppContainer",    // I believe this one is correct
    function() {                  // Callback once framework and app loaded
            "c:myAppComponent", // I believe this one is correct
            { },                  // attributes to set on the component when created
            "lightningLocator",   // Not Sure about this one -the DOM location to insert the component
            function(cmp) {
                // callback when component is created and active on the page
               'https://NotSureAboutThisOne/'  // I have no idea what this is supposed to be. Community endpoint

When the app is previewed I get the following: enter image description here

  • oh and I am pretty sure I will have to load this into a community page using Site Guest User profile so there will not have to be a login. Sep 7, 2019 at 17:01
  • what url do you use to preview the app? Sep 7, 2019 at 18:42
  • since you've developed it as a Lightning Out app, you have to view it from a Lighting Out perspective, i.e. in the visualforce page. The correct url would be mytattoostory-dev-ed.lightning.force.com/page/myAppVF Sep 9, 2019 at 8:24

1 Answer 1


I'd advise to start without the 'https://NotSureAboutThisOne/' line. I expect that that will allow you to preview the visualforce page (all the rest looks fine to me).

The url parameter is the URL for the Lightning domain on your Salesforce instance. For example, https://myDomain.lightning.force.com. I doubt if this is actually necessary. Previewing the visualforce page (while being logged in) works fine for me when leaving it empty.

It might be necessary once you've set up your community and assigned it public access. Do note that you need a community of type 'Salesforce Tabs + Visualforce' to use this kind of visualforce pages.

  • Thanks! I'll get on this and let you know what happened. Sep 7, 2019 at 21:29
  • Did not work. Either way. Sep 7, 2019 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .