English
What is the difference between allí and ahí? Is there any difference in pronunciation between the two? Are there any contexts where one is correct and one is wrong, or are they completely synonymous?
Español
¿Cuál es la diferencia entre allí y ahí? ¿Hay alguna diferencia de pronunciación entre las dos? ¿Hay algún contexto en el cual una de ellas es correcta y la otra no, o son completamente sinónimas?
Right now (at least in Spain) they are not synonyms and the use of them differs in the distance of the place from the speaker.
Ahí = en ese lugar (in this place)
Allí = en aquel lugar (in that place)
So “ahí” is nearer to the speaker than allí. RAE says they can be synonims but that the use as synonyms is outdated.
The difficulty may be in knowing how far has to be the place to choose one or the other. I would say that it doesn’t matter much but “ahí” is usually used with things you can watch directly, for example if you are in front of the White House you can say:
Ahí está la Casa Blanca (you can see it and say that while you point at it with your finger)
Allí está la Casa Blanca (you can see it, but you think it’s far from you)
but for example if you’re in Washington and you want to speak about New York then probably we would say:
Juan está en Nueva York. Allí está el Empire State, ¿no?
Anyway it’s just a perception of how the user can consider the distance. The best example of its use you may find it in a sentence where both are used to mean that something is further than the other.
For example in Paris while being closer to the Louvre Museum than the Eiffel Tower you could say:
Mira ahí está el Museo del Louvre y allí la Torre Eiffel.
As for pronunciation, they are not pronounced in the same way at all. The “h” has not sound in “ahí” and the double l: “ll” is pronounced as in the word “callar”. Have a look at this answer from this site where it’s explained how to pronounce “ll”.