Redirect a website

Hello,
Is it possible to redirect a web site without an Apache web server? I have a web site and when I entered the domain name in the browser, then it forwarded to my old web site!
I checked my Virtual Host config file, but I can’t find anything wrong:

<VirtualHost *:80>
ServerAdmin root@localhost
ServerName www.example2.com
ServerAlias www.example2.com
DocumentRoot /var/www/wp
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
RewriteEngine on
RewriteCond %{SERVER_NAME} =example2.com [OR]
RewriteCond %{SERVER_NAME} =www.example2.com [OR]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect permanent / https://www.example2.com

TraceEnable off
ServerSignature Off

# SSL
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off

</VirtualHost>

<Directory "/var/www/wp">
# Options -Indexes +FollowSymLinks
Options -Indexes
AllowOverride All
Require all granted
</Directory>

When I enter example2.com in my browser, then it forwarded to my old web site (example1.com). Which part of the system must be examined? My Linux server is just a web server and not have any DNS service.
I did an Apache test too:

# httpd -S
[Tue Sep 28 19:12:20.306653 2021] [so:warn] [pid 972821:tid 132710422649152] AH01574: module deflate_module is already loaded, skipping
[Tue Sep 28 19:12:20.306861 2021] [so:warn] [pid 972821:tid 132710422649152] AH01574: module headers_module is already loaded, skipping
VirtualHost configuration:
*:443                  www.example2.com (/etc/httpd/conf.d/ssl.conf:40)
*:80                   www.example2.com (/etc/httpd/conf.d/wp.conf:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/wordpress"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/etc/httpd/run/" mechanism=default 
Mutex cache-socache: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
PidFile: "/etc/httpd/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODSEC_2.5
Define: MODSEC_2.9
User: name="apache" id=48
Group: name="apache" id=48

I also check the DNS of the old and new domain name with the https://dnschecker.org/:

Example1:

Type	Domain Name	    TTL	    Address
A	    Example1	    120	    1.2.3.4

AAAA
Sorry no record found!

CNAME
Sorry no record found!

MX
Sorry no record found!

NS
Type	Domain Name	    TTL	    Canonical Name
NS	    Example1	    3600	win-noXXXXXXXXX.

SOA
Type	Domain Name	    TTL	    Primary NS	        Responsible Email
SOA	    Example1	    3600	win-noXXXXXXXXX.	hostmaster.



Example2:

Type	Domain Name	    TTL	        Address
A	    Example2	    3600	    1.2.3.4

AAAA
Sorry no record found!

CNAME
Sorry no record found!

MX
Sorry no record found!

NS
Type	Domain Name	    TTL	    Canonical Name
NS	    Example2	    3600	win-noXXXXXXXXX.

SOA
Type	Domain Name	    TTL	    Primary NS	        Responsible Email
SOA	    Example2	    3600	win-noXXXXXXXXX.	hostmaster.

What is wrong?

Thank you.

If this happens only in your browser it might be that there was a redirect set up at some point and your browser cached it.

Can you try it on the command line using curl?

If the problem persists, it may been set up in wordpress somehow.

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