Getting a visa prior to your arrival in Iran is by far the safest way to avoid any kind of inconveniences, who could disturb your stay in Iran. Process is relatively simple, you will have to go through 2 main steps, more explanation beside. The duration of the visa is 30 days, against only 15 days if you get your visa at the airport. This option is heavily recommended for tourists who would like to stay in the country for a stay superior to one month, or for those who don't want to take the risk of doing the Visa on Arrival (at the airport). It's also the only option you have if you want to go to Iran via a border crossing.