Website only opens with www, no support when www is omitted

Please how can I get this forensic data? From which url is the data gotten?... :face_with_hand_over_mouth:

2 Likes

crt.sh | adaoma.shop

11 Likes

Morning from here... :slight_smile:

2 Likes

Thanks to you all for your excellent contributions. Now I have my vhost set to the below and Apache Server restarted and it partially solved the issue, I observed a redirect from "adaoma.shop" to "https://www.adaoma.shop" in Opera browser, however, Firefox and Chrome purged "The page isn't redirecting properly". Will appreciate more helps.

<VirtualHost *:80>
        ServerAdmin admin@adaoma.shop
        ServerName adaoma.shop
        ServerAlias www.adaoma.shop
        DocumentRoot /var/www/html/adaoma/
        <Directory /var/www/html/adaoma/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        RedirectMatch permanent ^/(.*)$ http://www.adaoma.shop/$1       
</VirtualHost>
2 Likes

One more issue to be tackled also, which is the redirect issue from http to https. Please take a look at an example url below.

http://adaoma.shop/blog

I do not get the desired redirect feature from http to https and my url part-field is not been captured in a redirect when https is not used in the redirect url string. :slight_smile:

1 Like

There's a redirect loop for www.adaoma.shop. http://www.adaoma.shop/ redirects to http://www.adaoma.shop/ (i.e.: itself), causing the loop. As http://adaoma.shop/ also redirects to http://www.adaoma.shop/, it also enters the same loop after the initial redirect.

Currently, there is no HTTP to HTTPS redirect.

Also, adaoma.shop still presents a certificate for just the www subdomain.

9 Likes

What are you suggesting I do now?

1 Like

Shouldn't that be to https://www... (not http:)

12 Likes

Can you be more specific? Changing http to https should not cause a syntax error.

What error message do you see?

10 Likes

I have absolutely no idea what these seven words mean.

8 Likes

Thanks once more great forum, I have all issues resolves today, all domain formats working, Thanks @MikeMcQ, thanks @Osiris, thanks @rg305, thanks @Rip. You all are great and your supports are educative. Below is the vhost configuration that works as expected. No errors, all redirects are working OK.

      <VirtualHost *:80>
              ServerAdmin admin@adaoma.shop
              ServerName adaoma.shop
              ServerAlias www.adaoma.shop
              DocumentRoot /var/www/html/adaoma/
              <Directory /var/www/html/adaoma/>
                      Options Indexes FollowSymLinks
                      AllowOverride All
                      Require all granted
              </Directory>
              ErrorLog ${APACHE_LOG_DIR}/error.log
              CustomLog ${APACHE_LOG_DIR}/access.log combined
              RedirectMatch permanent ^/(.*)$ https://www.adaoma.shop/$1       
      </VirtualHost>
3 Likes

Ok...
But you haven't covered all the bases:

http://www.adaoma.shop    forwards to https://www.adaoma.shop [GOOD]
http://adaoma.shop        forwards to https://www.adaoma.shop [GOOD]
https://www.adaoma.shop   works as expected                   [GOOD]
https://adaoma.shop       fails with cert security warning    [BAD]
10 Likes

Thanks for the observation able Community leader, do I need to add another RedirectMatch as below or..., what step should I take?

    RedirectMatch permanent ^/(.*)$ 
    https://adaoma.shop/$1
2 Likes

Step #1: Ensure there is a cert to cover the name adaoma.shop and it is being used.
Step #2: Build a vhost (to serve the redirection to "www") for site https://adaoma.shop
OR modify the existing HTTPS vhost and ensure both names are being served and add the redirection to "www" therein.

10 Likes

[that was left unanswered]

8 Likes

...zzz...
off to bed...
[5:30 am]

8 Likes

Alright Senior Man, am not within reach of my PC now, will do that in couple of hours time.

2 Likes
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: www.adaoma.shop
    Serial Number: 476142fecd9274de2eb321869ba1bf2d141
    Key Type: RSA
    Domains: www.adaoma.shop
    Expiry Date: 2022-11-07 03:22:31+00:00 (VALID: 60 days)
    Certificate Path: /etc/letsencrypt/live/www.adaoma.shop/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/www.adaoma.shop/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

You need to get another cert, with both names on it:
www.adaoma.shop, adaoma.shop

9 Likes

As shown here crt.sh | adaoma.shop your present certificate has only www.adaoma.shop matching, where your 2022-07-08 certificate had (has) adaoma.shop and www.adaoma.shop matching.

2 Likes