Wordpress www.mydomain.com redirects to mydomain.com
-
wrote on Nov 27, 2021, 9:49 PM last edited by
Hello everyone, I'm new to the forum. I'installed wordpress in cloudron and set it up for www.mydomain.com. when web surfing for www.mydomain.com, i get automatic redirected to mydomain.com. this causes google to report redirect error. Could you point me on how to cancel this redirect. Thanks in advance.
-
Hello everyone, I'm new to the forum. I'installed wordpress in cloudron and set it up for www.mydomain.com. when web surfing for www.mydomain.com, i get automatic redirected to mydomain.com. this causes google to report redirect error. Could you point me on how to cancel this redirect. Thanks in advance.
@hav81 this could be either, your WordPress setup which redirects to non-www and Cloudron is trying to redirect back or the other way around. You should check your .htaccess file and the wp-options table of your WP installation.
-
wrote on Nov 28, 2021, 3:12 PM last edited by humptydumpty Dec 1, 2021, 8:10 PM
In Cloudron, go to the app settings --> location. Type WWW in that field. Then, create a new redirect and keep it empty so that the bare domain gets redirected to www.
-
In Cloudron, go to the app settings --> location. Type WWW in that field. Then, create a new redirect and keep it empty so that the bare domain gets redirected to www.
wrote on Nov 29, 2021, 6:37 AM last edited by@humptydumpty , I have www configured in the Location. Before I had in the aliases configured the root, I've deleted this and add it as suggested in the redirect. Same problem, when i go on the web for the www.mydomain.com, or mydomain.com, both takes me to mydomain.com. if you have other ideas let me know. Thanks
-
@hav81 this could be either, your WordPress setup which redirects to non-www and Cloudron is trying to redirect back or the other way around. You should check your .htaccess file and the wp-options table of your WP installation.
-
@hav81 this could be either, your WordPress setup which redirects to non-www and Cloudron is trying to redirect back or the other way around. You should check your .htaccess file and the wp-options table of your WP installation.
wrote on Nov 29, 2021, 7:02 AM last edited by@msbt thanks for your feedback, I'm new with web hosting, what do i need to check in the htacess and where to access it? Also in the wp-option, how can I acess it? I have only installed Cloudron and Wordpress on the server. Thanks
-
@msbt Thanks for the suggestion, I'm a novice with htaccess, how can I see if this is the problem? Thanks
wrote on Nov 29, 2021, 4:13 PM last edited by@hav81 you can access the htaccess file using the file manager when you go into the app's settings in your cloudron. Go into the PUBLIC folder and htaccess is right there.
-
Hello everyone, I'm new to the forum. I'installed wordpress in cloudron and set it up for www.mydomain.com. when web surfing for www.mydomain.com, i get automatic redirected to mydomain.com. this causes google to report redirect error. Could you point me on how to cancel this redirect. Thanks in advance.
-
@hav81 you can access the htaccess file using the file manager when you go into the app's settings in your cloudron. Go into the PUBLIC folder and htaccess is right there.
wrote on Dec 1, 2021, 7:09 PM last edited by@humptydumpty, thanks, i learned a new thing, so here is my htaccess file
Do you see something that cases the redirect from www.mydomain.com to mydomain.com?BEGIN WordPress
Directivele (liniile) între „BEGIN WordPress” și „END WordPress” sunt
generate dinamic și ar trebui modificate numai prin filtrele WordPress.
Toate modificările la directivele cuprinse între acești marcatori vor fi suprascrise.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>END WordPress
-
@hav81 Did you import an existing WordPress from elsewhere or is this a fresh installation? If it's imported, then was your previous site was located at
mydomain.com
?wrote on Dec 1, 2021, 7:17 PM last edited by@girish thanks for the question
I've purchased a server on linode.
On that server I've installef cloudron.
Then in my cloudron i've installed a fresh wordpress developer module.
Let me know if I can provide more info to support to figure out why there is a redirect. -
@girish thanks for the question
I've purchased a server on linode.
On that server I've installef cloudron.
Then in my cloudron i've installed a fresh wordpress developer module.
Let me know if I can provide more info to support to figure out why there is a redirect.@hav81 the htaccess file looks like the standard one. Can you send the real domain name to support@cloudron.io and I can try to see if we see the same behavior from the outside ?
-
Hello everyone, I'm new to the forum. I'installed wordpress in cloudron and set it up for www.mydomain.com. when web surfing for www.mydomain.com, i get automatic redirected to mydomain.com. this causes google to report redirect error. Could you point me on how to cancel this redirect. Thanks in advance.
wrote on Dec 2, 2021, 12:30 AM last edited by@hav81 I had this problem too and I lost my config but I was having luck with using the multi-site enabled with sub-domain however I did not use the root of the sub-domain.
It was:
wp.mydomain.com => set as the app in Cloudron primary URL
used for setup, plugins, users but no real site was herethen add a subdomain on top of:
devsite1.wp.mydomain.com => set as a redirect in Cloudron App
devsite2.wp.mydomain.com => set as a redirect in Cloudron AppIn WP MultiSite I set the URLs to the virutal folders:
/wp
/wp/devsite1
/wp/devsite2For Prod I then had planned on cloning and doing another entry with both:
www.someotherdomain.com www.whatsNot.app (E.G)
and whatsNot.app as additional redirects and set to a cloned new /wp/whatsnotapp/Maybe something like this can be included in the App as an option in setup. I only had to change the two things already mentioned
Multisite = true in wp-config and then .htaccess.
It was easier to map the virutal folders to /media so you could see what was going on as well.
-
@hav81 the htaccess file looks like the standard one. Can you send the real domain name to support@cloudron.io and I can try to see if we see the same behavior from the outside ?
-
@hav81 thanks for sending across the info. I think in your case what is happening is the reverse of what you said.
- If I visit
www.domain.com
, it is still onwww.domain.com
. - If I visit
domain.com
, it redirects towww.domain.com
.
I suspect the source of your confusion is Google Chrome URL bar. Google chrome drops the
www
when it displays the locationPlease see https://www.bleepingcomputer.com/news/google/google-chrome-hides-www-and-https-in-the-address-bar-again/ . If you click on the URL, you will see that it is
www.domain.com
.Here is your site, after I visited
www.domain.com
:I then click the URL bar, I see the www and https:
The behavior is better in Firefox.
- If I visit
-
@hav81 thanks for sending across the info. I think in your case what is happening is the reverse of what you said.
- If I visit
www.domain.com
, it is still onwww.domain.com
. - If I visit
domain.com
, it redirects towww.domain.com
.
I suspect the source of your confusion is Google Chrome URL bar. Google chrome drops the
www
when it displays the locationPlease see https://www.bleepingcomputer.com/news/google/google-chrome-hides-www-and-https-in-the-address-bar-again/ . If you click on the URL, you will see that it is
www.domain.com
.Here is your site, after I visited
www.domain.com
:I then click the URL bar, I see the www and https:
The behavior is better in Firefox.
- If I visit
-
@hav81 there was a bug in the code as well where removing a "redirect" was causing a crash. I have fixed this now - https://git.cloudron.io/cloudron/box/-/commit/cefbe7064f4c7b31fb93bbf7ed85bf916aa5cf39
-
@hav81 there was a bug in the code as well where removing a "redirect" was causing a crash. I have fixed this now - https://git.cloudron.io/cloudron/box/-/commit/cefbe7064f4c7b31fb93bbf7ed85bf916aa5cf39