DNS Error on local with DevKinsta

So I Download the DevKinsta, and I clone to my local the site that I have in a staging environment.
I have everything configured, and I when I go to the hosts file and I have:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

START DEVKINSTA entries

127.0.0.1 nameofmysite.local
127.0.0.1 www.nameofmysite.local
::1 nameofmysite.local
::1 www.nameofmysite.local

END DEVKINSTA entries

This seems to be correct, but I can’t see the site, always with this error:


What am I missing?

Hey @Ana_Nogal :wave:,

did you edit the image to hide the domain? Or for some reason your browser is trying to visit ‘http’?

Does the same happen to you when you open the site from the site page in DevKinsta?

Also, if you access DevKinsta settings what is the current status of the Port selector?

Screenshot 2023-11-16 at 11.31.00

Regards,
Alessandro

So I have this in the port selector


I have it with http, but I had it before with https and the result was the same :slight_smile:

When that option is enabled, your site address shouldn’t be only https://yourlocalsite.local but it should have a port number too.
What does the URL look like in the single site view in DevKinsta?

Oh! it does not have a port number. How can I change this?

Try to simply uncheck the checkbox of the Auto-detect open port settings

I did, but it does not put the port in the end. I stoped and restarted the site and it still does not work. And the port still not appears in the site host

Hi there :wave:

Can you please try to un-check the “Auto-detect open ports” in that DevKinsta’s Port selector section, and then put the HTTP field with 80 and the HTTPS field with 443 and click Confirm?
Then see if you can access your local site URL on your browser (without any port)?

If it’s still not working, can you please try to ping that local site URL in question and please provide us with the screenshot of the ping results (depends on your operating system, on Windows you can do it via command prompt, on Linux/Mac you can do it on terminal program) with something like:
ping yourlocalsiteurl.local

Best regards,
Agus

Hello Agus,
Sorry for the late response, I am in Europe :slight_smile:
So I can ping the site correctly… could this be Chrome that is blocking this? Because I check and I don’t have the firewall active. I have a mac by the way.
Screenshot 2023-11-17 at 10.13.55

Ana

So I tried in Safari and I got this message:
Screenshot 2023-11-17 at 10.15.58

And I was looking at the URL and it puts it like this: https://https//mysite.local/
Could it be this extra https that is making the problem? I can’t remove it. It puts it back again if I write: http://mysite.local/

Hello Ana,

yes, that is definitely the issue. It looks like for some reason part of the URLs in your site have been updated with the wrong structure.
You should be able to fix that by running a search and replace by using WP CLI. Are you familiar with the process? If so, you can open Docker, move to the Container tab, click on the container called [
devkinsta_fpm and from there select the tab terminal.
From that session, you will be able to move to your site folder by using the command cd public/novoda (be sure to update the name of the site if it doesn’t match with yours) and use WP CLI to run the search and replace. I would probably look for:

http// and replace it with nothing
http\/\/ and replace it with nothing
http\\/\\/ and replace it with nothing

I’d also recommend running all the commands with the --dry-run parameter first and be sure to double-check the results.

Regards,
Alessandro

Hi Alessandro,
So I was doing that and I got this error:

Ana

Is the site a multisite?
Can you please check if inside the wp-config.php file you have a domain specified and if that has been changed as novoda.local?

Yep, it’s a multisite, sorry I didn’t know…
Screenshot 2023-11-17 at 14.00.54
How should I proceed now?

Hey,

the DOMAIN_CURRENT_SITE shouldn’t have the scheme specified, remove the http:// and leave just novoda.local

Regards,
Alessandro

Thanks Alessandro,
I could finally put the site to work :blush:
Best,
Ana

You are very welcome Ana, glad it worked!

Regards,
Alessandro

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