HomeSEO

Fix 404 Not Found Error With 301 Redirect Using htaccess File

Like Tweet Pin it Share Share Email

404 not found error hum sabke liye bahut hi common hai. Google search console me crawl errors me aap apni site ki 404 errors dekh sakte hain.

Waise to kuch 404 errors se hamari site par koi effect nahi padta, lekin aisi errors agar bahut jyada ho to hamari site ki ranking and traffic par iska bahut bura effect padta hai.




Isliye aapko hamesha apni website ko regular analyze (check) karna chahiye ki kahi koi error to nahi hai hai specially 404 errors. Yah kaam aap Google search console me easily kar sakte hain.

  • Just login to Google search console and click Crawl » Crawl Errors
  • Click not found tab

google search console crawl error

yaha aap apne 404 not found URLs dekh sakte hain jo ki available nahi hain. Aise not found errors aapko fix karne ki jarurat hai.

Ab aise 404 errors wale URLs ko fix kaise kare?

Iska simple sa tareeka hai “Jo  Post URLs aapki site me available nahi hai (404 not found), unhe kisi other similar post URL par redirect karna




For example, meri ek post hai “wordpress install kaise kare” jo ki 404 error show kar rahi hai, ab us URL ko main apni other post “Bluehost me wordpress install kaise kare” par redirect kar dunga.

Ab question yah hai ki URL ko redirect kaise kare?

WordPress par aap URLs ko 2 methods se redirect kar sakte hain.

  1. Redirect plugin se
  2. .htaccess file se

Website me Post/page ko plugin se kaise redirect karte hain iske bare me main aapko bata chuka hu.

Read: How To Redirect URLs using Plugin.

Aaj main aapko site par kisi bhi page/post ko .htaccess file ke jariye new URL par kaise redirect karte hain uske bare me batane ja raha hu.

Redirect Post/page URLs using .htaccess File

Agar aapki website me bahut si 404 errors hain then its time to fix all these URLs.




Sabse pahle Google search console me login karke 404 pages ko find kare, jaisa ki maine aapko above bataya hai. Login to Google search console and click Crawl and then click Crawl errors. yaha Not found me aap apne 404 error pages dekh sakte hain.

google search console crawll error

Ab aise 404 errors URLs ko aap Fix karne ke liye 2 simple methods use kar sakte hain.

  • Jo Post not found hai usko similar Post par redirect karna
  • Jo Post not found hai uski new Post create kar and redirect karna

Not found URL ko new URL par redirect karne ke liye follow below steps:

Sabse pahle .htaccess file open kare. Yoast SEO plugin me Tools » File Editor me aap .htaccess file edit kar sakte hain, Ya fir Cpanel me File manager par .htaccess file edit kar sakte hain.

.htaccess file me sabse below yah code paste kare.




Redirect 301 /old 404 url/ new redirect url/

Google search console me 404 URL ko copy kare aur old 404 url me paste kare, ab new redirect URL me apna new redirect address add kare.

See example below taki aapko proper samajh me aaye.

Redirect 301 /blogger-headings-style-change/ http://askmehindi.com/blogger-headings-style-change/

Note: Old URL me aapko full address type nahi karna hai jaise ki above aap dekh sakte hain, search console me jaisa address hai wo copy kar paste karna hai.

yoast seo htaccess file

Ab aapka 404 error page new set kiye gaye URL par redirect hoga, mean aapne successfully 404 not found ki error ki fix kar liya hai.

Final Words

To above tutorial me aapne dekha ki kaise without plugin aap .htaccess file se 404 not found errors fix kar sakte hain. Above method kafi easy hai aur plugin install karne ki jarurat nahi padti.




Waise plugin se aap yah kaam easily kar sakte hain lekin itne small work ke liye plugin use karna theek nahi hai kyun ki jyada  plugin use karne se aapki site speed par effect padta hai.

Must Read:

Comments (2)

  • Post kisne kiya name jo upor show hote hai …woh kaise set karete hai

    Reply
    • Author

      Hello utpal, wordpress theme me yah feature already available hoti hai. Post title ke below author name lagbhag sabhi themes me yah feature hoti hai. Aap sayad ribbon theme use kar rahe hain, plz check theme options in Appearance,agar option nahi hai to theme support forum me aap pooch sakte hain.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *