Ensure root URL is constructed correctly