Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Hosts file on S60 3.x Devices

From Wiki
Jump to: navigation, search
Article Metadata
Created: nikhil_vaj (02 Dec 2007)
Last edited: hamishwillee (31 Jul 2012)

This article is intended for network application developers, who wish to 'hard-code' IP addresses for certain server names. This mechanism comes in handy when the developer wants to redirect network traffic from a live site to another test site, without the knowledge of the end user.



The "HOSTS" file is a lookup table. When the network application (such as web browser) requests to create a connection with a network server, the IP address is needed to create the connection. If the requesting application asks for "", this name must be converted to an IP address. The domain name system consults the HOSTS file to see if there is an entry for "" in it. If there is, then the IP address given in that entry will be used to create connection to.

This substitution will continue so long as the HOSTS file is present. To revert back to original behavior, one should simply delete this file.

Example HOSTS file:

# This is a sample HOSTS file (taken from a MS-Windows system) # source server # x client host

Like all the other advanced operating systems, Symbian includes support for HOSTS file. In all the operating systems, there is always a special place for HOSTS file. E.g. in UNIX like systems, the file goes in /etc . We will now see where to save the HOSTS file on S60 devices.

Pre-PlatSec World

In S60 phones without platform security, this file is located in

PlatSec World (S60 3.x onwards)

In the recent phones with platform security, this file is located in

Since this is a "private" location, one requires a file browser (or an application) with AllFiles capability to copy the file to this location.

Recommended Reading

This page was last modified on 31 July 2012, at 07:32.
42 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.