Custom Domain not propogating to other pages?

Hello,

I have a site that hosts some episodic fiction that I’m writing over at ultramechabattlingcircuit.com. I noticed when I click on links to pages that aren’t the home page, the route domain changes to the site name. For example: https://ultramechabattlingcircuit.netlify.app/about/ instead of https://ultramechabattlingcircuit.com/about/. The latter still works if you manually enter it in that way but, it awkward.

Is there any way I could prevent this from happening?

I’m not really a webdev or networking person so I’ve probably missed something obvious, but I didn’t notice anything in the documentation, netlify settings, or forum threads that were the same issue. I’m building the website in Publii and the domain registrar is Porkbun, if that info is relevant.

Thank you!

@dwoboyle If you view the source code of your deployed page, you will see that all your links are defined as absolute links including https://ultramechabattlingcircuit.netlify.app

To fix the issue, adjust your site code.

Make all of your links “root relative” (so they start with /) and you won’t have this issue.

So instead of:

https://ultramechabattlingcircuit.netlify.app/the-world-of-umbc/timeline/

You would have:

/the-world-of-umbc/timeline/
1 Like

I think I understand, but were would I do that? Would that be in the actual code of the website?

Yes. The HTML itself must be changed.

1 Like

Ah, dang. Ok, I’ll have to poke around on the Publii forums to see if there’s an easy way to implement this.

Thank you for the speedy, friendly, and detailed responses! As I mentioned, I don’t have a ton of experience in webdev stuff, so I really appreciate the help.

@dwoboyle It’s mentioned in the documentation here:
https://getpublii.com/docs/server-configuration.html

Server Configuration Options

Every server type that you choose will include two basic, universal options:

  • Website URL - This will usually be the home URL of your site if you are running your own server e.g. www.mysite.com; you can also choose which protocol to use, including http://, https://, file:///, dat://, ipfs://, dweb://, or no protocol if you are aiming for manual deployment on an intranet site. Cloud storage solutions will usually use their own generated domain; our in-depth guides for each server type will cover where to find this.

  • Use Relative URLs - This option converts full URL paths to relative paths e.g. https://www.mysite.com/path/ to /path/

If you find you struggle to get root relative URL’s going, you could always set your website URL to your .com (instead of the netlify.app).

1 Like

oh my god… I feel like such a dummy. hahah. I didn’t even try or consider just setting the dang website URL field to the domain. I chalk this up to expecting everything to be much more complicated than that.

It worked like a charm!