I'm building a multisite on Craft CMS 4 and I'm having trouble with channel URLs. At the moment I'm working locally and then pushing it to the hosting via github.

I've created a folder for each site within the templates folder. The urls for the singles work fine i.e. https://mybasesiteurl/secondsiteurl/about. However, when I create a channel it forces me to include the site template folder in the url so it becomes https://mybasesiteurl/secondsiteurl/secondsite/blog. I have a number of channels all with the same problem.

The channels each have their own folders within the site templates folder but I have tried taking them out so they sit in the second site templates folder with the singles - same problem.

I'm also having trouble with the templates not finding the CSS which is in a CSS folder in the web-second-site folder. Here's how I've linked it:

<link href="css/normalize.css" rel="stylesheet" type="text/css">

This is my first Craft site so it's possible I've gone wrong somewhere with the multisite setup. I've configured everything as per the instructions in the admin panel and I've created a web folder for the second site and added the following to its index.php file:

define('CRAFT_SITE', 'theJanuaryProject');

Have I gone wrong somewhere?

  • Hey for the channel section what is your Entry URI Format?
    – aodihis
    Commented Dec 26, 2022 at 4:11
  • 1
    A relative URL for CSS will never work with URL rewrites, even on a single site setup, because your URIs might be /level-1-slug/level-2-slug so css/normlize.css would be /level-1-slug/css/normlize.css, which doesn't exist
    – Capsule
    Commented Dec 26, 2022 at 12:01


Your Answer

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