Multiple values for a single URL parameter - Is that possible?
-
I have a website which supports three languages - German, Spanish, Portuguese - by using language parameters.
How do I configure my URL parameters so that the only the Spanish and Portuguese URLs are crawled but not the German URLs. Basically, how do i specify two values for a single parameter.
-
I know you posted this a while ago, but I've just seen it.
The simplest way would be to generate your ROBOTS meta tag based on the parameter. I code in PHP so this is my example, but it will depend on your platform
Say your URL is domain.com?lang=es or ?lang=po or ?lang=de
$lang = $_GET['lang'];
if($lang=="de"){ echo ''; }
else{ echo ''; }
I left 'follow' in the German line because you may already have pages in the index, so this means Google DE has free reign over all your site, but any pages it finds should not be indexed.
If the site's not live yet, then you can change the 'follow' in the DE line to 'nofollow'.
Hope this helps.
-
I know you posted this a while ago, but I've just seen it.
The simplest way would be to generate your ROBOTS meta tag based on the parameter. I code in PHP so this is my example, but it will depend on your platform
Say your URL is domain.com?lang=es or ?lang=po or ?lang=de
$lang = $_GET['lang'];
if($lang=="de"){ echo ''; }
else{ echo ''; }
I left 'follow' in the German line because you may already have pages in the index, so this means Google DE has free reign over all your site, but any pages it finds should not be indexed.
If the site's not live yet, then you can change the 'follow' in the DE line to 'nofollow'.
Hope this helps.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Numbers in URL
Hey guys! Need your many awesome brains. 🙂 This may be a very basic question but am hoping you can help me out with some insights beyond "because Google says it's better". 🙂 I only recently started working with SEO, and I work for a SaaS website builder company that has millions of open/active user sites, and all our user sites URLs, instead of www.mydomainname.com/gallery or myusername.simplesite.com/about, we use numbers, so www.mysite.com/453112 or myusername.simplesite.com/426521 The Sales manager has asked me to figure out if it will pay off for us in terms of traffic (other benefits?) to change it from the number system to the "proper" and right way of setting up these URLs. He's looking for rather concrete answers, as he usually sits with paid search and is therefore used to the mindset of "if we do x it will yield us y in z months". I'm finding it quite difficult to find case studies/other concrete examples beyond the generic, vague implication that it will simply be "better" (when for example looking at SEO checklists and search engine guidelines). Will it make a difference? How so? I have to convince our developers of the importance and priority of this adjustment, or it will just drown in the many projects they already have. So truly, any insights would be so very welcome. Thank you!
Technical SEO | | michelledemaree2 -
Affiliate Link is Trumping Homepage - URL parameter handling?
An odd and slightly scary thing happened today: we saw an affiliate string version of our homepage ranking number one for our brand, along with the normal full set of site-links. We have done the following: 1. Added this to our robots.txt : User-agent: *
Technical SEO | | LawrenceNeal
Disallow: /*? 2. Reinserted a canonical on the homepage (we had removed this when we implemented hreflang as had read the two interfered with each other. We haven't had canonical for a long time now without issue. Is this anything to do with the algo update perhaps?! The third thing we're reviewing I'm slightly confused about: URL Parameter Handling in GWT. As advised - with regard to affiliate strings - to the question: "Does this parameter change page content seen by the user?" We have NO selected, which means they should be crawling one representative URL. But isn't it the case that we don't want them crawling or indexing ANY affiliate URLs? You can specify Googlebot to not crawl any of particular string, but only if you select: "Yes. The parameter changes the page content." Should they know an affiliate URL from the original and not index them? I read a quote from Matt Cutts which suggested this (along with putting a "nofollow" tag in affiliate links just in case) Any advice in this area would be appreciated. Thanks.0 -
Query strings in Canoncials URLs
Video on my site all resides at www.mydomain.com/video in a player that does not assign unique URLs for each video. We may be able to rewrite the URLs to include a unique identifier found in the video's metadata (www.mydomain.com/video/?bctid=17769780). If I did this, how would it impact the canonical URL? Do the SEs accept canonicals with query strings? What if I only changed the canonical URL and did not change the video's URL? Would that be a problem?
Technical SEO | | BostonWright0 -
Order of keyword usage in URL
Hi, I have been wondering for a few weeks if the order of keyword usage for a long tail keyword made a difference. Today I ran an on-page report here for a new page which is a review of a product. The report warned about the keyword usage in URL which made me question my knowledge about this. let's say the page is titled Razer Mouse Review my URL is www.example.com/review/razer-mouse I thought it was a bad idea to repeat the same word in a URL, that's why I categorized all my reviews under review directory and avoided using the word "review" more than once. Should I modify this url and make it www.example.com/review/razer-mouse-review Note: I see the report listed this under "moderate importance factors" and still gave the page A grade. any ideas appreciated!
Technical SEO | | Gamer070 -
Creating new website with possible Url change (301 involved?)
Hi, I am currently getting a web designer to upgrade my website. I have built lost of links to my internal pages, should I get him to 301 redirect example.com/about.html (old) to example.com/about (new) OR Is there any need for this once the page doesn't change to example.com/about-us? Thank you in advance 🙂
Technical SEO | | Socialdude0 -
Can I redirect a URL that has a # in it? How?
Hi there - My web developer is saying that I can't do a URL redirect with a "#" in it. Currently, the URL is actually an anchored link within a page (which the URL indicates with a #). I want to change the content to a new URL, but our website links internally to the old URL, so we would need to do a URL redirect (assume 301). Can you tell me if this is possible and how? Thanks!
Technical SEO | | sfecommerce0 -
HTML url extension
I've read some information about the extension of an url. But i couldn't find a clear answer. What is better for SEO, an extension with html or without? /make-money-online/how-to-make-a-million-dollars-in-1-year/ or /make-money-online/how-to-make-a-million-dollars-in-1-year.html/ Is there a difference between a normal website or a blog?
Technical SEO | | PlusPort0