Naked Domain Rewrite
- Last Updated: August 5, 2025
- 1 minute read
- LoadMaster
- LoadMaster GA
- Documentation
There may be scenarios where a www prefix needs to be added to the original request, for example, if the original request is mydomain.com, this will be rewritten to www.mydomain.com
Solution
Using the Naked_Domain_Rewrite rule below, requests automatically have www appended to the original request.
Example - Static Version
Rule Name: Naked_Domain_Rewrite
Rule Type: Replace Header
Match Type: Regular Expression
Header Field: host
Match string: /^mydomain\.com$/
Modified URL: www.mydomain.com
Example - Dynamic Version
Rule Name: Naked_Domain_Rewrite
Rule Type: Replace Header
Match Type: Regular Expression
Header Field: host
Match string: /^(.*)$/
Modified URL: www.\1