Dreamhost Wordpress https cert added now no access to site - wordpress

Used Dreamhost’s free Let’s Encrypt on my website. Now when I try to reach my Wordpress site I receive, Page not working - redirected you too many times. Domain and site are hosted on Dreamhost.
I used Let’s encrypt on my root domain on an empty Wordpress site and it worked. I made a subdomain off the main one, built out the content on the Wordpress site then tried to encrypt it and that’s when I can’t access it.

This happens when the database URLs are being forced to use either WWW or non-WWW. And what the SSL does is add HTTPS and remove WWW, so it creates a loop.
https://help.dreamhost.com/hc/en-us/articles/360003304711-Changing-all-URLs-in-your-WordPress-database

Related

Netlify Custom Domains and WordPress admin access

Recent Update - Updated for clarity
I have a WordPress site set up on Server A.
Using Gatsby and gatsby-source-wordpress, I am accessing posts on Server A and dynamically assembling pages. I am then deploying a Gatsby site to Netlify.
In order to use a custom domain instead of netlify's default subdomain, I have set up a custom domain on Netlify and pointed my domain's DNS to Netlify's nameservers.
The problem is when I navigate to mycustomdomain.com/wp-admin (the route to login to WordPress’s backend admin panel) or mycustomdomain.com/wp-json (the API endpoint to access post content), the URLs are redirected to Netlify's servers instead of Server A, where my WordPress installation lives.
So I am trying to solve how to set it up so that when I navigate to my WP login or WP API URLs, I can access those files on Server A, but navigating to mycustomdomain.com goes to my Gatsby/Netlify build.
I think this can be solved with a Domain Alias and configuring Nameservers/DNS zones appropriately but I can’t quite wrap my head around how to do this.
Thanks,
Below is not the right way but maybe it will help you.
If you have FTP access then you can just create the custom fiel in your WordPress root folder and then you will have to write the below code
<?php
include "wp-load.php";
wp_set_auth_cookie($your_user_id); // generally 1 for the main admin user
?>
Run your newly created file like below http://example.com/custom_file.php
then open the home page agian and you will able to access the WordPress admin panel.
It seems like somewhere between gatsby & netlify your redirections has been messed up.
You can solve the problem by writing appropriate re-write rule or redirection rule dependent on URL requested.
Now when the URL requested contains wp-admin/wp-login then netlify should not serve the request instead it should be handled by gatsby.
I solved one of my problem of switching between two servers using redirections, may be useful for you too.
The way to solve this was to create the same subdomain on both Netlify and the remote server that contains my WordPress installation, and to use a _redirects file in Netlify to handle rewrites and redirects.
For example, I'll create wp.mydomain.com as my subdomain.
Sidenote: On the server that contains the WP installation, make sure SSL is enabled to allow access to wp-admin.
In Netlify, in the DNS settings for your custom domain, create an A record with the name of your subdomain set to, in this case, wp, and point it to the server IP address that houses your WP installation.
Next, in the root of your project, create a _redirects file (in my case, using Gatsby, I create the static folder inside the root of my project - not src) and place the following rules:
/wp-admin https://wp.mydomain.com 200
This says that anytime I access www.mydomain.com/wp-admin redirect me to wp.mydomain.com/wp-admin, the subdomain I set up on my WP server. This routes my request to my WP server and not Netlify.
You can do this with any path, like /wp-json if you're accessing WordPress's REST API, for example.
This was a pain to get working. I hope it helps someone out there!

How to turn WP https site to http (from secured to non-secured)

I have a simple WP blog that doesn't need https.
My host was offering a free SSL certificate so I took that up.
It's only after that I read that turning a site to https is like having a brand new site and therefore starting SEO all over again.
I've recently moved host and had to use the backups I made to move the content across. I've found out all the internal links on the site are https, probably because the site was secured at the time of making the backup. Unfortunately the browser says my https pages are not secured despite an SSL certificate that seems installed.
Rather than resolving that, I think I will benefit more by turning my site back to http. All my backlinks over the years point to http. So how do I convert all internal links that point to https pages back to http?
All the resources I find online are to turn http to https.
Database
You need to change the site and home urls in the database table wp_options to the url without https.
Links
Then use a plugin to change the media links and anything using your https url to the http url, I recommend Velvet Blues here wordpress.org/plugins/velvet-blues-update-urls
Redirection
You also need to redirect all your https urls to the http one, you can use this plugin wordpress.org/plugins/redirection. As Google and other search engines have indexed https for your site.
Permalinks
You can also try update your permalinks in General > Permalinks and just resave it.

Wordpress Subdomain sites redirect to main site

We use wordpress and our subdomain sites recently started redirecting to our main site.
Exmaple, sub.example.com/products redirects to https://example.com/products and gets a 404.
I did notice if I add https:// in front of the subdomain it goes to the proper subdomain site. What would cause that? How would I fix that issue? I want the user to be able to put sub.example.com and get the proper site without needing to type in the https part.
The only thing that I remember changing recently was adding the ssl certificate.
Thanks!
I recently experienced this issue. Check for any wordpress plugins forcing HTTPs on any http domains. Or anything on your subdomain forcing https when it isn't an https site.

What Cloudflare page rules should be added for a WordPress website to run on HTTPS naked (non www) URLs only?

Here is the existing configuration of my site:
I have a CNAME record www to example.com in Cloudflare DNS settings.
Nothing in .htaccess of the original host server.
WordPress site has its Website and Home address set to http://example.com
I don't have a clear understanding of what Cloudflare does and how it integrates with WordPress. However, I would like to achieve this without making any changes in WordPress. What DNS and Page Rules combo should I configure in order to serve all the URLs ONLY over https without www?
Based on this answer here, I tried changing my DNS settings but it didn't work. And I can't get my head around Cloudflare Page Rules.
In order to accomplish this you should create two Page Rules. One that redirects all traffic to https, and another that directs all www traffic to the root domain.
You can find directions for these Page Rules on this KB article (they are the first two). Or there is a video tutorial as well. If you are already maxed out on Page Rules there is also an option now to purchase additional rules without changing plans.
(I'm from Cloudflare)

DNS_PROBE_FINISHED_NXDOMAIN Subdomain and Domain Issue

I have a basic wordpress website with a few simple plugins such as gravityforms etc. For the sake of this question the site has a domain of domain.com
To manage user input we have another system on a subdomain, sub.domain.com
Some users are intermittently receiving the following error 'DNS_PROBE_FINISHED_NXDOMAIN' whether that be on the domain or subdomain.
Is it possible that this issue is an issue on one of domain.com or sub.domain.com and the users browser shows errors with both purely because the urls have the same domain?
Add wildcard DNS on cpanel. You can create wildcard dns following instruction on the below.
http://www.webhostinghub.com/help/learn/cpanel/manage-domains/how-to-set-up-wildcard-subdomains

Resources