Links Using IP Address instead of Domain Name Address

Hi All... Hope everything is going well for you here at the end of 2017!

Um... I'm having problems with the Hyper-Links on my Concrete5 8.2.1 website.

Every 3-4 days all the links on my site will show the website IP Address [ ]
instead of the Domain Address [ ].

When I click on the IP Address links... I'm taken to the browsers warning page "this site is unsafe! blah, blah, blah!"

However, the next day... all the links will be back to using the domain name and all the links work just fine.

There is one single anomaly... In the top left hand Global Area ... the link to take every one to my home page NEVER changes. It's all ways the Domain name address.

I'm using:
1. the default theme that comes with Concrete5
2. "Mega-Menu" add on in the top Global Area for Navigation
3. the regular "Auto-Nav" that comes with Concrete5 in the Footer
4. the "BreadCrumb" add-on ON the regular web pages themself.

Every link in all of these switches between the two different link addresses every 3-4 days... Even if I don't edit the website at all. [ except for the ONE exception mentioned above ]

I have turned OFF Concrete5 website caching... I have cleared out all my browser caches... I click RELOAD on my browser when visiting my web site... this phenomenom still occurs.

Is this a Concrete5 thing or is it a HostGator thing? Could this be caused by something that HostGator might be doing? I have never seen this behavior before and I really don't know what to do about it.

Any thoughts or suggestions will be very VERY appreciated.

Thanks in advance...
Michael C.

View Replies:
jero replied on at Permalink Reply
Although you say you have turned concrete5 caching off, it does sound like it is still enabled. With a block cache on, typically something like an autonav or other menu block will build the menu with the website address used to access the site. This then ties all other visitors to this address, in your case an IP address because the block's output is cached.

Maybe switching the cache off has fixed your problem and you were just seeing residual effects due to browser caching, which can be quite persistent especially if the full page cache is enabled.

I would suggest that you add a redirection from your IP address to the proper website address. This should stop any caching from happening. You will still get the certificate error, but hopefully most people will not bother going any further.

To add a redirect, you can try adding this to the top of your .htaccess file before anything else:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^goodworld2015\.com$ [NC]
RewriteRule .{REQUEST_URI} [R=301,L]

That way, any attempt to access your site by IP address will be redirected to your domain name before concrete5 runs and therefore it cannot cache anything with your IP address.
stewblack23 replied on at Permalink Reply
I would add to that manually clear site cache and add the redirect in the htaccess file just as jero suggested above.