The title says it all. As you can see in screenshot I can successfully access apache using hostname I tried in in different computer same result. But when i use my mobile phone it says "site can't be reached." I tried pinging it in my phone but no luck. Please can u help me whats the problem here?
1 Answer
I guess if you have to access via hostname you have to edit your host file on android so that it can know the hostname and redirect to the IP address of Pi
Add a line in hosts file with
IP-address-of-Pi hostname(name by which you want to access pi) I think to edit hosts file your device should be rooted
here are few links which might help
http://www.trishtech.com/2014/08/edit-hosts-file-in-android/
https://www.theandroidportal.com/edit-modify-hosts-file-block-websites-android-root/ https://android.stackexchange.com/questions/60150/how-to-edit-etc-hosts-file
Hope it helps!
- 1I think this is not applicable if the users phone is not rooted. my aim is to connect on Apache without using a IP address but the hostname. I checked all possibilities but i dont why i cant connect on my android even if i can see him in networkJhay02– Jhay022017-10-20 09:10:26 +00:00Commented Oct 20, 2017 at 9:10
- I think it's because the systems or servers on network or internet are fundamentally identified by IP address (since we cant remember IP address DNS comes into the picture so that it can redirect to the IP address mapped to the name.) When you try to connect to Pi on the phone if it says This site can’t be reached and server DNS address could not be found or ERR_NAME_NOT_RESOLVED. It most probably could be fixed by above method (editing the host file). To my knowledge, I think it could be done only if the phone is rooted because we are editing the internal files.Sneha– Sneha2017-10-20 15:02:25 +00:00Commented Oct 20, 2017 at 15:02
- Not a good method.. i think, but thanks for the @SnehaJhay02– Jhay022017-10-21 02:46:45 +00:00Commented Oct 21, 2017 at 2:46

http://pisowifiin address. It does Google search if you do not puthttp