Basically, I’ve learned those characters have the same pronounciation (“Zu” and “Ji”, respectively) and so I tried searching up when to use one or another. The answer I’ve found on more than one website is the same: ” づ (zu) only occurs when there is a つ (tsu) in front of it like in つづく (tsuzuku – to continue) or when a Kanji (Chinese character) that has a reading which starts with つ (tsu) is paired at the end with another character changing the つ (tsu) to a づ (zu).”, with the same applying to ぢ. The thing is, being that the rule, why is it that when i searched for the hiragana writing of “頭痛” (Zutsū), it says it’s “ずつう”? Shouldn’t it be “づつう” or is it not mandatory to use づ in those cases?