Tagged: Apache
- AuthorPosts
- July 30, 2021 at 2:25 pm #41151DonnyGuest
What would it cost to redirect www to nonwww?
July 30, 2021 at 2:41 pm #41169Jesse OwensKeymasterHello Donny-
Thanks for the great question about how to create a www redirect for WordPress Hosting.
First, there shouldn’t be any kind of cost associated with this, it’s likely just a technical issue.
Typically, all you need to do is create a CNAME DNS record for your www subdomain, like so:
www.example.com IN CNAME example.com
For your case specifically, you have all the correct DNS records, but the main problem is your SSL certificate. It only includes your main domain name, not the www subdomain. Most SSL certificates should include the www subdomain by default, so you might consider reaching out to your SSL provider (or likely your web host), and asking for the certificate to be reissued with both the primary domain as well as the www subdomain.
If you’re not able to get your SSL certificate reissued, you could also consider adding a redirect in your
.htaccess
file to redirect all traffic to your website without using the www subdomain. Here’s a sample htaccess rule you can use:RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
August 2, 2021 at 1:12 pm #41219DonnyGuestThank you Jesse for such a quick response. The problem was the SSL. I added an AutoSSL through the server and all is back to normal with the .htaccess redirect rule.
- AuthorPosts
- The topic ‘Redirect www to nonwww domain’ is closed to new replies.