Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:1237ʿAffān > Ḥammād b. Salamah > ʿAlī b. Zayd > Rabīʿah b. al-Nābighah from his father > ʿAlī

[Machine] The Messenger of Allah ﷺ forbade visiting graves, but he made an exception and said, "Except for intoxicated individuals."  

أحمد:١٢٣٧حَدَّثَنَاهُ عَفَّانُ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ أَخْبَرَنَا عَلِيُّ بْنُ زَيْدٍ عَنْ رَبِيعَةَ بْنِ النَّابِغَةِ عَنْ أَبِيهِ عَنْ عَلِيٍّ قَالَ

نَهَى رَسُولُ اللهِ ﷺ عَنْ زِيَارَةِ الْقُبُورِ فَذَكَرَ مَعْنَاهُ إِلا أَنَّهُ قَالَ وَإِيَّاكُمْ وَكُلَّ مُسْكِرٍ