title: Unable to add Firebase Dynamic Links to a project using a custom domain
body: <p>I've created Firebase Dynamic Links in other projects before using the page.link URL prefix (the only option at the time). However that no longer appears to be an option when enabling Dynamic Links for a new project today. It looks like the <a href="https://firebase.google.com/docs/dynamic-links/custom-domains" rel="noreferrer">docs for custom domains</a> were updated today. Unfortunately, while they provide some helpful examples, they don't explain how to resolve my issue in a way that I can understand.</p>
  
  <p><a href="https://i.stack.imgur.com/VtNBJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VtNBJ.png" alt="error configuring dynamic links for custom domain"></a></p>
  
  <p>So this message seems to indicate that I need to "Put links under a subpath". It seems to me that adding the <code>/link</code> path prefix here should accomplish that? But after making that change, I get the same error message.</p>
  
  <blockquote>
    <p>It looks like you already have content served on this Hosting site. Put links under a subpath to avoid conflicts with existing content.</p>
  </blockquote>
  
  <p>I order to try to work around this, I went to my project and added the suggested Hosting configuration and deployed it.</p>
  
  <p>firebase.json:</p>
  
  <pre><code>{
    "hosting": {
      "public": "dist",
      "ignore": [
        "**/.*"
      ],
      "appAssociation": "AUTO",
      "rewrites": [
        {
          "source": "/link/**",
          "dynamicLinks": true
        },
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    }
  }
  </code></pre>
  
  <p>Even after waiting an hour, I keep getting the same error and I don't understand what to do.</p>
  
  <p>Note that I have the rewrite to <code>/index.html</code> because I have an Angular Single Page Application hosted at www.devintent.com.</p>
  
  <p>No matter what I do, I keep getting this error and the <code>Continue</code> button stays disabled. I tried using my naked domain devintent.com instead of www.devintent.com, but that didn't help. I tried using links.devintent.com, but got the same error. </p>
  
  <p>If I manually remove <code>disabled</code> from the <code>Continue</code> button, then I get this error message:</p>
  
  <p><a href="https://i.stack.imgur.com/Cr34I.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Cr34I.png" alt="configure path prefix manually message"></a>
  This links to the <a href="https://firebase.google.com/docs/dynamic-links/custom-domains?authuser=0#manual" rel="noreferrer">docs for manually configuring hosting for dynamic links</a> which has some steps that I've already completed. Clicking the <code>Check Again</code> button just takes me back to the same error in the first image above.</p>
  
  <hr>
  
  <p>Workaround to not use Custom Domains</p>
  
  <p>I'm happy at this time to use a <code>page.link</code> link, I just need to create a Dynamic Link and get unblocked on this task, but I can't figure out any way in the console to allow me to do that either.</p>
  
  <p>Update on this: I figured out that I needed to add the subdomain to the <code>page.link</code> URL. The tooltip says "or a free Google-provided domain (for example, yourapp.page.link)" at the end. This is a little less prominent that I would have liked (as I didn't find it for quite a long time). Using <code>devintent.page.link</code> works for me as a workaround for now.</p>
  
  <hr>
  
  <p>However, I'm not sure why the Custom Domain configuration didn't work and why it would be the default if there are such complications with projects with existing Hosting configurations and custom domains.</p>