Site not loading properly after domain name change

I recently changed my domain name and I got my service provider (Ionos 1&1) to simply fix things their end so that my new domain name simply points to the same place as my old one. But, for some reason that I can’t figure out, my website does not load up with graphics and proper formatting, just a bunch of text down the left side that looks crap.

I’ve logged into my MODX manager and had a look through every file and folder for anything that has the old domain name so I could change it to the new one in the hope that this would fix it, but I can’t find any such thing and not sure if this would have fixed it anyway.

Does anybody know if there is one specific thing that I have to do to re-connect my site to MODX so it displays correctly again with graphics and images etc?

This sounds like your CSS files and images can’t be load.
Maybe check the error messages in the browser’s developer tools.

Did you try clearing the cache?

How exactly do you add CSS files and images to your site?

In your template, do you have a line like this: <base href="[[!++site_url]]" />? Is the tag for the site_url uncached (with a !)

Thanks for this. Ok, I don’t actually do the site maintenance myself as I’m not that savvy with CSS and the like. My knowledge is basic HTML tags, that’s about it. But, the guy who normally does my site fixes for me is unavailable for the foreseeable future.

I looked in the ‘template’ and I have this line: base href=“[[++site_url]]” /

I checked the error messages in my browser’s developer tools and I have 19 repeated lines of this: Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made.

I also have one line of this: ReferenceError: Can’t find variable: stLight

Two of the error codes are do with /assets/css/reset.css and the other /assets/css/layout.css.

All the rest are relating to jpeg images.

Try replacing the base tag in the template with

<base href="[[!++site_url]]" />

Notice the additional ! in the tag.

Are the paths to the CSS files (assets/css/reset.css) relative to this base url?
When you look at the source code in the browser, is the content of this base tag correct?

If this doesn’t work you could try the following:

  • Check the .htaccess file to see if there are rewrite-rules with a hardcoded domain/http_host.
  • If you have multiple contexts, you might have to change the context-settings http_host and site_url.
  • In the file core/config/ change the domain in the 2 lines $http_host=...

Wow! Thanks, halftrainedharry. That’s got me most of the way there. I simply added the ‘!’ before the two plus signs in the base href as you suggested and the site displays correctly now.

However, when I right click and view the source code in Safari (as you recommended) when I click on the Errors icon I get three lines and when I click the ‘Warning’ icon I get two lines.

I can’t copy and paste them here as I’m a new user and the site won’t allow new users to put links in so can you have a look, my site is:

I appreciate your clear explanations for getting, at least, my site to display now.

Thanks so much.

Change the URL in this line to https:// instead of http://

<script type="text/javascript" src=""></script>

That’s super, that got rid of the Warning, but there are now just two Errors remaining.

I don’t see any errors anymore, just warnings.

In your markup, the <script> tags are below the closing </body> tag. Move them above </body>.


<script type="text/javascript" src="..."></script>


Thanks for your help, Half. I did that, moved the three script lines above the body and I still have two errors coming up. They are both to do with failing to load resource with 404 error on Background.jpg and footerback.png

These images are referenced in the CSS file assets/css/layout.css.

Do these files exist on the server?


I’ve just checked in my MODX file structure and I don’t see those images there.

Maybe these are some leftover lines from an older design of the webpage. Probably these errors have been there for quite some time.

If the design of your website looks correct, then just delete the 2 lines from the CSS file layout.css.

Do I delete all this:

#footer {
top: 10px;
background-image: url(/assets/template/graphics/footerback.png);
text-align: left;
font-family: Arial;
font-size: 12px;
color: white;
background-color: #404040;
clear: both;
margin-bottom: 5px;
position: relative;
background-position: center top;
background-repeat: repeat-x;
height: 50px;
width: 960px;

No! The rest is still needed.

To be really save, just comment out the line background-image: url(/assets/template/graphics/footerback.png);

/* This is a CSS comment */

/* background-image: url(/assets/template/graphics/footerback.png); */

Ok, I just deleted the two relevant lines, not by commenting them out, I just removed them, but made no difference.

Really appreciate this. I suspect there might be something else as in the ‘assets’ folder there is no ‘templates’ folder. And, the lines below suggest it is trying to locate a template/grapics/foot… etc, that isn’t there as there is no template folder in assets.

Delete the browser cache (or make a hard refresh) so that the changed CSS file gets loaded from the server.

Curious, how do you do a hard refresh in a browser, I’m on Safari.

Wow, just removed cache from Browser and, yeah!! no more errors.

Thanks so much, halftrainedharry, this has been a real pleasure. Like in real time or something and your explanations were so easy for me to follow, given I don’t understand any of this stuff and all I know are a few HTML tags - not really code at all.

Thanks again, so much.