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
-
URL has caps, but canonical does not. Now what?
Hi, Just started working with a site that has the occasional url with a capital, but then the url in the canonical as lower case. Neither, when entered in a browser, resolves to the other. It's a Shopify site. What do you think I should do?
Technical SEO | | 945010 -
Dynamic vs. static URLs
Hello Everyone, I'm new here on MOZ and just getting back into SEO (a little bit) after not doing anything 'myself' for a couple of years. Currently my individual URLs show as: https://www.example.com/index.php?l=product_detail&p=107 (dynamic responsive site). I can switch it to a static site, so the individual product pages read as:https://www.example.com/catalog/category name/product name-107.html It's still a long URL, but it would be keyword rich. Some of my current dynamic pages are indexed,and due to an upgrade I had to do several months back, I already have some redirects (301) from my php extensions to the one listed above. This is my long explanation to my following questions: Does having a dynamic or static site matter when ranking in search engines I already have some redirects coming my older site to this dynamic site, so I would have to make more directs from the dynamic site to my static site - is this okay to do? I'm really at a loss, a couple of years ago, I ranked 1-3 (on Page 1) on Google for all my keywords, (all White Hat work), and now I'm into great abyss of no mans land of the internet (ranked on Page 3+) Thank you for any and all help from everyone! ~Sandra
Technical SEO | | rankmenow0 -
What is the best practice to seperate different locations and languages in an URL? At the moment the URL is www.abc.com/ch/de. Is there a better way to structure the URL from an SEO perspective?
I am looking for a solution for using a new URL structure without using www.abc.com**/ch/de** in the URL to deliver the right languages in specific countries where more than one language are spoken commonly. I am looking forward to your ideas!
Technical SEO | | eviom0 -
What's the best URL Structure if my company is in multiple locations or cities?
I have read numerous intelligent, well informed responses to this question but have yet to hear a definitive answer from an authority. Here's the situation. Let's say I have a company who's URL is www.awesomecompany.com who provides one service called 'Awesome Service' This company has 20 franchises in the 20 largest US cities. They want a uniform online presence, meaning they want their design to remain consistent across all 20 domains. My question is this; what's the best domain or url structure for these 20 sites? Subdomain - dallas.awesomecompany.co Unique URL - www.dallasawesomecompany.com Directory - www.awesomecompany.com/dallas/ Here's my thoughts on this question but I'm really hoping someone b*tch slaps me and tells me I'm wrong: Of these three potential solutions these are how I would rank them and why: Subdomains Pros: Allows me to build an entire site so if my local site grows to 50+ pages, it's still easy to navigate Allows me to brand root domain and leverage brand trust of root domain (let's say the franchise is starbucks.com for instance) Cons: This subdomain is basically a brand new url in google's eyes and any link building will not benefit root domain. Directory Pros Fully leverages the root domain branding and fully allows for further branding If the domain is an authority site, ranking for sub pages will be achieved much quicker Cons While this is a great solution if you just want a simple map listing and contact info page for each of your 20 locations, what if each location want's their own "about us" page and their own "Awesome Service" page optimized for their respective City (i.e. Awesome Service in Dallas)? The Navigation and potentially the URL is going to start to get really confusing and cumbersome for the end user. Think about it, which is preferable?: dallas.awesomcompany.com/awesome-service/ www.awesomecompany.com/dallas/awesome-service (especially when www.awesomecompany.com/awesome-service/ already exists Unique URL Pros Potentially quicker rankings achieved than a subdomain if it's an exact match domain name (i.e. dallasawesomeservice.com) Cons Does not leverage the www.awesomecompany.com brand Could look like an imposter It is literally a brand new domain in Google's eyes so all SEO efforts would start from scratch Obviously what goes without saying is that all of these domains would need to have unique content on them to avoid duplicate content penalties. I'm very curious to hear what you all have to say.
Technical SEO | | BrianJGomez0 -
Landing Page URL Structure
We are finally setting up landing pages to support our PPC campaigns. There has been some debate internally about the URL structure. Originally we were planning on URL's like: domain.com /california /florida /ny I would prefer to have the URL's for each state inside a "state" folder like: domain.com /state /california /florida /ny I like having the folders and pages for each state under a parent folder to keep the root folder as clean as possible. Having a folder or file for each state in the root will be very messy. Before you scream URL rewriting :-). Our current site is still running under Classic ASP which doesn't support URL rewriting. We have tried to use HeliconTech's ISAPI rewrite module for IIS but had to remove it because of too many configuration issues. Next year when our coding to MVC is complete we will use URL rewriting. So the question for now: Is there any advantage or disadvantage to one URL structure over the other?
Technical SEO | | briankb0 -
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 -
How much of a hit to changing urls?
Hi, We have a few pages that from an SEO perspective have poor URLs. We are planning on changing them (and 301 redirecting) the old page to the new page. I heard in the past, this can temporarily negatively impact your SERP rank etc. Since the old URLs are bad, even if there is a temporary negative hit, changing them in the long run it is better, but curious if anyone has any experience on what to expect.
Technical SEO | | NicB10 -
Special characters in URL
Hello everybody, my question focus on special parameters in URL. I i am working for a website that use a lot of special entities in their URLS. For instance: www.mydomain.com/mykeyword1-mykeyword2%2C-1%2Cpage1.html I am about to make 301 redirect rules for all these urls to clean ones. IE: www.mydomain.com/mykeyword1-mykeyword2%2C-1%2Cpage1
Technical SEO | | objectif-mars
would become:
www.mydomain.com/mykeyword1-mykeyword.html I just wanted to know if anybody has already done this kind of "cleanup" and if i could expect a positive boost or not. Thanks0