Siman 561
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א הָרוֹאֶה עָרֵי יְהוּדָה בְּחֻרְבָּנָן אוֹמֵר: עָרֵי קָדְשְׁךָ הָיוּ מִדְבָּר, וְקוֹרֵעַ וְאֵינוֹ חַיָּב לִקְרֹעַ אֶלָּא כְּשֶׁמַּגִּיעַ סָמוּךְ לָהֶם כְּמִן הַצּוֹפִים לִירוּשָׁלַיִם (בֵּית יוֹסֵף).
1 The rule if one sees the Cities of Judah, Jerusalem, and the Mikdash (Temple) in their destruction, and in it is 5 paragraphs. One who sees the Cities of Judah in their destruction says "Your Holy Cities have become a desert" (Isaiah 64:9) and rends (one's clothes like in the laws of mourning). Rema: And one is not obligated to tear except when one reaches near to them like from Tzofim to Jerusalem [Bais Yosef]
ב הָרוֹאֶה אֶת יְרוּשָׁלַיִם בְּחֻרְבָּנָהּ, אוֹמֵר: צִיּוֹן הָיְתָה מִדְבַּר שְׁמָמָה וְקוֹרֵע; וּכְשֶׁרוֹאֶה בֵּית הַמִּקְדָּשׁ, אוֹמֵר: בֵּית קָדְשֵׁנוּ וְתִפְאַרְתֵּנוּ אֲשֶׁר הִלְלוּךָ (בּוֹ) אֲבוֹתֵינוּ הָיָה לִשְׂרֵפַת אֵשׁ וְכָל מַחְמָדֵנוּ הָיָה לְחָרְבָּה, וְקוֹרֵעַ. וּמֵהֵיכָן חַיָּב לִקְרֹעַ, מִן הַצּוֹפִים; וְאַחַר כָּךְ כְּשֶׁיִּרְאֶה הַמִּקְדָּשׁ קוֹרֵעַ קֶרַע אַחֵר, וְכָל קְרִיעָה טֶפַח; וְאִם בָּא דֶּרֶךְ הַמִּדְבָּר, שֶׁאָז רוֹאֶה הַמִּקְדָּשׁ תְּחִלָּה, קוֹרֵעַ עַל הַמִּקְדָּשׁ, טֶפַח, וְאַחַר כָּךְ כְּשֶׁיִּרְאֶה יְרוּשָׁלַיִם מוֹסִיף עַל קֶרַע רִאשׁוֹן כָּל שֶׁהוּא.
2 One who sees Jerusalem in her destruction, says "Tzion is a desert, a desolation" (Isaiah 64:9) and rends (one's garments). And when one see the Beit HaMikdash says "Our holy Temple, our pride, Where our fathers praised You, Has been consumed by fire: And all that was dear to us is ruined." (Isaiah 64:10). And from where is one obligated to rend - from HaTzofim. And afterwards when he sees the the Mikdash, he rends another tearing. And all rendings are a tefach (handbreath). If one comes from the way of the desert that then he sees the Mikdash first. He rends on the Mikdash a tefach, and afterwards when he sees Jerusalem, he adds to the first rending a little bit.
ג אִם קָרַע עַל אַחַת מֵעָרֵי יְהוּדָה, אֵינוֹ חוֹזֵר וְקוֹרֵעַ כְּשֶׁיִּרְאֶה שְׁאָר עָרֵי יְהוּדָה; חוּץ מִירוּשָׁלַיִם, שֶׁחוֹזֵר וְקוֹרֵעַ עָלֶיהָ קֶרַע אַחֵר בִּפְנֵי עַצְמוֹ; וְאִם קָרַע עַל יְרוּשָׁלַיִם תְּחִלָּה, אֵינוֹ צָרִיךְ לִקְרֹעַ עַל שְׁאָר עָרֵי יְהוּדָה.
3 If one rends on seeing one from the Cities of Judah, he does not go back and rend when seeing other Cities of Judah except Jerusalem, that he does go back and rend on it. On it, he does another rending by itself. And if he rends on Jerusalem first, it is not necessary to rend on the other Cities of Judah.
ד כָּל הַקְּרָעִים הָאֵלּוּ בְּיָדוֹ וּמְעֻמָּד, וְקוֹרֵעַ כָּל כְּסוּתוֹ שֶׁעָלָיו עַד שֶׁיְּגַלֶּה אֶת לִבּוֹ, וְאֵינוֹ מְאַחֶה קְרָעִים אֵלּוּ לְעוֹלָם; אֲבָל רַשַּׁאי לְשָׁלְלָן, לְמָלְלָן, לְלַקְּטָן וּלְתָפְרָן כְּמִין סֻלָּמוֹת.
4 All these rendings are with his hand and standing. And he rends all the clothes he has on until it reveals his heart. And he does not (properly) connect these rendings forever but it is permissible to baste (loose stitching), to hem, to gather, or to sew like chain-stitches.
ה הָיָה הוֹלֵךְ וּבָא לִירוּשָׁלַיִם, הוֹלֵךְ וּבָא תּוֹךְ ל' יוֹם, אֵינוֹ קוֹרֵעַ קֶרַע אַחֵר; וְאִם לְאַחַר ל' יוֹם, חוֹזֵר וְקוֹרֵעַ וְהוּא הַדִּין בְּעָרֵי יְהוּדָה וּבַמִּקְדָּשׁ.
5 If one is going and coming to Jerusalem, going and coming, so if within 30 days, he does not rend another tearing. If after 30 days, he does back and rends. Rema: So is the law with the Cities of Judah and the Mikdash.