The Shulchan Aruch (OC 561:2) writes that when seeing ‘Yerushalayim in its destructive state’, one should say ‘Zion has become a desolate desert’ and tear keriah. Upon seeing the ruins of the Beis Hamikdash one should tear keriah (again) and say ‘Our house of holiness and glory in which our ancestors sang praise to You, and all that we hold precious has been destroyed.’
The Mishna Berura (and others) writes that Yerushalayim is only considered to be ‘in a destructive state’ when it’s under foreign rule. Thus, R’ Moshe Feinstein writes (Igros Moshe OC 4:70) that as Yerushalayim is under Jewish rule today, one need not tear keriah when seeing Yerushalayim. One does, however, upon seeing the Temple ruins.
While R’ Moshe Sternbuch writes (Teshuvos Vehanhagos 1:331) that one tears upon seeing the Dome of the Rock, others (Baer Heitev 561:5) write that it is ideal to view the Har Habayis itself. Ideally one should try to find a higher vantage point to accommodate all views.
As one doesn’t need to tear keriah if he has been within 30 days, some sell their shirt to a friend while others go to the Kotel on Shabbos or Friday afternoon (the ‘first time’) to avoid doing so. R’ Moshe Feinstein writes (Igros Moshe YD 3:52) that one still tears on Friday afternoon, however.
ולירושלים עירך ברחמים תשוב …ובנה אותה בקרוב בימינו