recaptcha works on localhost not on ip-Address showing ERROR for site owner: Invalid domain for site key : - recaptcha-v3

recaptchaV3 works well on localhost but while testing with my ip address it shows ERROR for site owner:
Invalid domain for site keyenter image description here

Related

SSL activating in VPS Getting Error Below

I tried a website to activate an SSL in VPS I have many domain names but all are successfully active except one domain name freecodeing.com. I mention the error in the below IMPORTANT NOTES:
The following errors were reported by the server: Domain: freecodeing.com
Type: unauthorized
Detail: 82.180.162.33: Invalid response from
http://freecodeing.com/.well-known/acme-challenge/nX18j8YXwmGgeXnPuI-tugws3wfaRHPcFPq1CuCfq0M:
404 To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Please Solve the problem

Heroku custom domain ssl name mismatch error

I've added a custom domain (bought on GoDaddy) to my Heroku app and am on the hobby dyno. When I type in www.example.com everything works fine, but when I open example.com I get a name mismatch error.
My cname host www points to example-78914389.herokudns.com and I have forward to https://www.example.com on GoDaddy enabled.
The certificate is only valid for the following names: shortener.secureserver.net, www.shortener.secureserver.net.
Why is the certificate valid for these domains and not for my example.com?
I don't know if it matters, but I just ported the domain from zeit now to GoDaddy.
Problem solved!
I transferred my domain from GoDaddy to namecheap, then made an ALIAS record. I've also added example.com to my app in Heroku. I now have www.example.com and example.com added and both domains work.
If you have the same issue, check this out: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain

Bitnami on Google Cloud Platform enabling SSL Issue: Please fix DNS entries while enabling SSL

I am using the bitnami django on Google Cloud platform stack.
Goal: I want SSL configured on my bitnami stack hosted on Google Cloud. But their toolsudo ./bncert-tool complains "The domain resolves to a different IP address than the one detected for this machine. Please fix its DNS entries or remove it.
I have purchased a domain using google domains.
I have set up google dns to point to the IP address as I see in the bitnami stack. I have enabled mydomain.com and www.mydomain.com to forward to the cloud server ipaddress/home in Google domain name settings
I then tried to run the tool /opt/bitnami/bncert-tool:
sudo /opt/bitnami/bncert-tool
Welcome to the Bitnami HTTPS Configuration tool.
Domains
Please provide a valid space-separated list of domains for which you wish to
configure your web server.
Domain list []: mydomain.com
The following domains were not included: www.mydomain.com. Do you want to add them? [Y/n]: n
Warning: No www domains (e.g. www.example.com) or non-www domains (e.g.
www.example.com) have been provided, so the following redirections will be
disabled: non-www to www, www to non-www.
Press [Enter] to continue:
Warning: The domain 'mydomain.com' resolves to a different IP address than the
one detected for this machine, which is 'aa.bb.ccc.dddd'. Please fix its DNS
entries or remove it. For more info see:
https://docs.bitnami.com/general/faq/configuration/configure-custom-domain/
Press [Enter] to continue:
MY QUESTION:
How do I resolve this? I even tried adding both domains
mydomain.com www.mydomain.com
I want SSL enabled for mydomain.com and www.mydomain.com and not sure where I am going wrong?
Secondy, after the link forwards, how to associate my domain name so that the static IP doesn't keep displaying instead it shows the mapped domain mydomain.com/home
thanks
Suds
$nslookup mydomain
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
Name: mydomain.com
Address: 216.239.32.21
Name: mydomain.com
Address: 216.239.34.21
Name: mydomain.com
Address: 216.239.36.21
Name: mydomain.com
Address: 216.239.38.21
$ nslookup www.mydomain.com
Server: 192.168.0.1
Address: 192.168.0.1#53
Non-authoritative answer:
www.mydomain.com canonical name = ghs.googlehosted.com.
Name: ghs.googlehosted.com
Address: 172.217.26.179
$ dig +short NS mydomain.com ns-cloud-b1.googledomains.com.
ns-cloud-b2.googledomains.com. ns-cloud-b3.googledomains.com.
ns-cloud-b4.googledomains.com.
$ dig +short NS www.mydomain.com ghs.googlehosted.com.
You may need to change certain settings such as the domain name settings. If using Google Domains, the forwards actually don't integrate the A + Cname to one static IP. I had to physically create A and CName records.
This solved the first issue: What is interesting is one of my domains: mydomain.com is pointing multiple IP address whereas the other is point to different IP depending upon the DNS Server. This was also the one contributing to the error I used to get
when I ran sudo ./bncert-tool "The domain 'mydomain.com' resolves to a different IP address than the one detected for this machine, which is 'aa.bb.ccc.ddd'. Please fix its DNS entries or remove it.
I think physically forced the HTTPS redirection in web server settings. using this rule
/opt/bitnami/apache2/conf/bitnami/bitnami.conf,
Changed RewriteRule ^/(.*) https://example.com/$1 [R,L]
Then I still had some problems where the first hit the URLs will load, the next hit I would 404 errors.
I realized this was an issue with project level settings
opt/bitnami/apps/django/django_projects/Project/conf
sudo vi httpd-app.conf
WSGIScriptAlias /PROJECT '/opt/bitnami/apps/django/django_projects/PROJECT/PROJECT/wsgi.py'
to
WSGIScriptAlias / '/opt/bitnami/apps/django/django_projects/myproject/myproject/wsgi.py'
Then was the issue with ALLOWED HOSTS in settings.py:
Ensure the right ALLOWED HOSTS is updated, the project root or your application root, depending upon where you serve from.
/opt/bitnami/apps/django/django_projects/Project/Project
updated the settings in py here...
ALLOWED_HOSTS in settings.py

SSL sites gives Common name Invalid

SSL Error when assessing by IP address
I have an IP address as 192.0.2.13. On nslookup, it shows the answer as example.com
Now on assessing the IP address https://192.0.2.13 itself it gives, SSL error as Common name invalid and but if I tries to access https://example.com, it loads fine. Also, I can see SAN configuration as
DNS name : example.com
DNS name : examplem.com
Now, I want to know should I need to add IP address to SAN config as well?

Google API - Redirect URI with an internal IP

I'm creating an app using Google calendar API. Everything works fine on my local apache install, using localhost:8888/pathtoapp as the redirect URI.
I want to migrate the app to another machine on my local network. I tried changing the URI to the local ip of the new apache install. I get the following error...
Error: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://192.168.0.17/pathtoapp/
Any ideas on how I can use an internal IP as a redirect URI or other ways around it?
Thanks.
Looks like the API is not allowing you to use IP addresses. Try to use network name not ip address.
If you don't have access to the name, create an alias on your local machine for that specific IP.
[development environment suitable solution]
Whilst the Google Console will not allow you to have an IP as a redirect URI:
Invalid Redirect: http://10.100.1.1 must end with a public top-level domain (such as .com or .org)
you can create a host name entry which redirect you a valid domain to another the desired IP address:
$ vim /etc/hosts
Append:
10.100.1.1 localhost.com www.localhost.com
Now you can access your site from localhost.com or www.localhost.com and have localhost.com as the redirect URI.
It's not possible...you have to stick in a domain name on a public server for testing...seems stupid to me as well :-P
Duplicate of this:
Can a public IP address be used as Google OAuth redirect URI?
Use localhost:port/redirectpath to test on local machine.
For window OS, this error can be removed by adding host entry in your system so google will think it as coming from the given hostname
Take your global IP address say: 106.200.247.101 (or google what is my IP, you will get it)
go to C:\Windows\System32\drivers\etc\hosts on windows and add a new entry as below
eg:
106.200.247.101 abc.com
Then you will be able to refer to using given hostname