DynDNS is service that gives you free subdomain in form "anything.dyndns.org". The key feature is TTL value of A record is 60 seconds, so it is ideal in case you have dynamic public IP address assigned by your ISP. This is typical within ADSL connections almost everywhere. By using this free service you will get your RPi accessible through domain name without need of learning assigned IP address which can change quite often. At first you have to create an account at dyndns.com and create a subdomain. To fully automate the process of updating A record at DynDNS, you can use small daemon called ddclient. You have to install it:
apt-get install ddclient
After successful installation open configuration file in /etc
And adjust setting to something like:
use=web, web=checkip.dyndns.com, web-skip='IP Address'
Replace strings in bold to according values for you. Login and password are the same as login information to DynDNS web site. The value 600 means that IP address will be updated every 10 minutes (600 seconds). If you want you can set shorter or longer interval between updates. Now you can close configuration file (CTRL+X...) and save changes (...press "y" and Enter). To apply changes you have to restart ddclient daemon by command:
From now your RPi should be accessible from Internet under your DynDNS subdomain name. Correct port forwarding is required, of course.