/    Sign up×
Community /Pin to ProfileBookmark

Need Help in creating robots.txt

Hi Everyone,

I want some help in creating robots.txt for my website. I want to disallow some URL patterns but I don’t know, how to write that syntax in robots.txt

Example:
URLS of my websites are like:
[url]http://www.example.com/portfolio/portfolio1/[/url]
[url]http://www.example.com/portfolio/portfolio2/[/url]

Now, I want disallow all URLs after [url]http://www.example.com/portfolio/[/url]. I mean I want to disallow portfolio1 , portfolio2……. pages…

Is there any syntax for it?

Thank you in advance ?

to post a comment
SEO

3 Comments(s)

Copy linkTweet thisAlerts:
@Kevin2Oct 29.2015 — If you want to disallow /portfolio/:
User-agent: *
Disallow: /portfolio/

This would also disallow all folders under portfolio.

If you want to disallow portfolio1 and portfolio2 but allow their parent:
User-agent: *
Disallow: /portfolio/portfolio1/
Disallow: /portfolio/portfolio2/
Copy linkTweet thisAlerts:
@AlanRonNov 02.2015 — Create a notepad file named as robots.txt and upload in the root folder of your site.

Mention the following content in the file.

User-agent: *

Disallow:
Copy linkTweet thisAlerts:
@Bruce_KenwayNov 04.2015 — If you want to disallow /portfolio/:
User-agent: *
Disallow: /portfolio/

This would also disallow all folders under portfolio.

If you want to disallow portfolio1 and portfolio2 but allow their parent:
User-agent: *
Disallow: /portfolio/portfolio1/
Disallow: /portfolio/portfolio2/
[/QUOTE]


Thank you, what a great answer.
×

Success!

Help @gurutechnolabs spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...