Dumb SEO Questions

(Entry was posted by Saurabh Rawat on this post in the Dumb SEO Questions community on Facebook, 03/05/2016).

I want to block some invalid urls

I want to block some invalid urls..
www.xyz.com/subdirectry/my-page.aspx?12
www.xyz.com/subdirectry/my-page.aspx?13 and so on..

I want to block these urls in robots.txt file. Which one is right?

1. Disallow: /my-page.aspx?*

or
2. Disallow: /subdirectry/my-page.aspx?*

This question begins at 00:36:27 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 00:36:27
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions Facebook & G+ community.

  • Saurabh Rawat: I want to block some invalid urls..
    www.xyz.com/subdirectry/my-page.aspx?12
    www.xyz.com/subdirectry/my-page.aspx?13 and so on..

    I want to block these urls in robots.txt file. Which one is right?

    1. Disallow: /my-page.aspx?*

    or
    2. Disallow: /subdirectry/my-page.aspx?*


    
  • Neeraj Pandey: Disallow: /subdirectory/ your page address if only they are handful or if allowed are handful then /subdirectory/ and allow: /subdirectory/your allowed page 
  • Neeraj Pandey: If after URL with query parameter they generating best is to use canonical
  • Saurabh Rawat: I am not getting your point. +Neeraj Pandey. /subdirectory/ has other valid urls. 

View original question in the Dumb SEO Questions community on Facebook, 03/05/2016).