I recently noticed that the redirect from question-defense.com to www.question-defense.com was no longer working. Recently I updated WordPress and many of the plugins I have installed. The issue with this was some of the pages served from question-defense.com versus www.question-defense.com were serving different cached pages. After some investigating I thought the issue was related to caching however when caching appeared to b e turned off the issue still existed.
After digging a little bit deeper I noticed that WP Super Cache was in fact the issue. When looking into the /wp-content/cache/supercache directory there was caching for question-defense.com and www.question-defense.com. So when visiting http://question-defense.com the cache file was being served before the redirect happened. So i simply removed the question-defense.com directory using the command below.
Remove Domain.com Directory So WordPress Redirect Works:
- rm -rf question-defense.com
The above command was entered from within the supercache directory or wp-content/cache/supercache/. Removing this resolved the redirect issue.