Change www.domain.com to domain.com

Keywords: WordPress - AWS - Technical issue - Application configuration

bndiagnostic ID: 2b0e5e40-3968-75a0-c51e-4fb68e20b411

bndiagnostic output:

? Apache: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
We want to redirect the www.dealersocket.com to plain dealersocket.com (no www).

I’ve tried adding the redirect .htaccess commands to “/opt/bitnami/apache2/conf/vhosts/wordpress-htaccess.conf” but it doesn’t seem to help.

Can you help me find the right commands and where to put them so that it will redirect properly?

Hi @john.swaringen,

It’s explained in this guide:

https://docs.bitnami.com/ibm/apps/wordpress/administration/redirect-custom-domains/#redirect-wwwmyappexamplecom-to-myappexamplecom

Regards,
Michiel

1 Like

I followed the instructions and they did not work. It’s still showing both.

Hi @john.swaringen,

Can you run the bndiagnostic tool again so I can check your latest setup?

Regards,
Michiel

The latest code is: 4352dd9c-4915-3973-c0b7-0206c25c0fff

The same problem happens when I try to configure a force redirect from http:// to https://. I’ve followed the instructions Force HTTPS redirection with Apache and they don’t work.

Hi @john.swaringen,

In the file wordpress-https-vhost.conf you have the following configuration:

 <virtualHost *:80>
   ServerName www.DOMAIN.com
   Redirect permanent / http://DOMAIN.com/
</VirtualHost>

So you are redirecting all requests to http instead of https. Also the ServerName is still www.DOMAIN.com.

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.