File name same as folder name, ok?
-
Is it ok to have a folder and file name to be both the same
e.g
File name would be a page that lists a number of products and then within the folder there would be x-product.php, y-product.php etc
-
Jinx! You owe me a diet coke.
-
There is nothing technically wrong with this, so yes it is OK. I've seen this done before.
Some people also choose to use an index page at the directory level so that domain.com/xyz-products/ resolves with say "index.php". You would need to make sure you provide the right canonical/redirect combination if you do choose to go this route of course.
-
Is the folder itself also a page? Why not just make domain.com/xyz-products/ serve the domain.com/xyz-products.php page? That seems like the most intuitive way for it to work. When people want to get back from a product page within the xyz-products directory to the top level page, they may just edit the URL and delete everything after that (I do this all the time).
If you want to stick with the structure you listed, it shouldn't have any issues other than what I mentioned above.
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
-
Questions on switching domain name of my site
Hey guys, I purchased a domain name on May 1st and have been running my site on it since then. At the time when I added the domain name to the shopping cart, I felt that it was the best domain name a human could possibly come up with. But now, after two months, I am not so sure about it. And that means I am thinking of getting a new domain name and redirecting the old domain to the new one. Give that the domain is only two months old, there is not much to lose. However, my domain name does have some valuable backlinks, and has built some credibility in the eyes of search engines. According to MOZ Open Site Explorer, its Domain Authority is 10 and Page Authority (homepage) is 20. It's not much, but I fear that if I switch the domain name, I will reset the clock and the new domain name will have to earn the rankings from scratch That said, after searching this forum, I come across articles like this one from google and this 2012 article from MOZ that gave me some confidence. The MOZ article is from 2102, and there have been several changes since then. Is there an updated version of that article, or another legit article on the internet that you can point me to? As you can tell, I want to be more than sure that we don't take any hit during the migration process. Also want to mention that the site is on WordPress -- in case that is relevant. Thank you for your help.
Technical SEO | | deathbyseo0 -
Is there any value in having a blank robots.txt file?
I've read an audit where the writer recommended creating and uploading a blank robots.txt file, there was no current file in place. Is there any merit in having a blank robots.txt file? What is the minimum you would include in a basic robots.txt file?
Technical SEO | | NicDale0 -
Would using javascript onclick functions to override href target be ok?
Hi all, I am currently working on a new search facility for me ecommerce site... it has very quickly dawned on me that this new facility is far better than my standard product pages - from a user point of view - i.e lots of product attributes for customers to find what they need faster, ability to compare products etc... All in all just better. BUT NO SEO VALUE!!! i want to use this search facility instead of my category/product pages... however as they are search pages i have "robots noindex them" and dont think its wise to change that... I have spoken to the developers of this software and they suggested i could use some javascript in the navigation to change the onlclick function to take the user to the search equivelant of the page... They said this way my normal pages are the ones that are still indexed by google etc, but the user has the benefit of using the improved search pages... This sounds perfect, however it also sounds a little deceptive... and i know google has loads of rules about these kinds of things, the last thing i want is to get any kind of penalty or any negative reaction from an SEO point of view... I am only considering this as it will improve the user experience on my website... Can any one advise if this is OK, or a "no no"... P.s for those wondering i use an "off the shelf" cart system and it would cost me an arm and a leg to have these features built into my actual category / product pages.
Technical SEO | | isntworkdull0 -
Changing Domain Name
Hi all, A client has just got their .edu domain and they want to change their current domain name (a .com) to this new .edu domain. The domain's CMS is Wordpress. Please correct me if I'm wrong, but basically I will need to create a new site (but they want to keep current design), move everything across to the new domain name, and 301 URL per URL? What about all the citations that the old URLs have gotten? The website is listed on Google listings/maps for some of their local keywords. Is there anyway to preserve this? Thank you all in advance.
Technical SEO | | EdwardDennis0 -
URL Folders and Naming Convention Changes?
1. We’re looking for some clarification in regards to our URL structure. Currently, at our product level we have http://www.ties.com/v/a/elite-solid-black-black-tie however the parent URL is http://www.ties.com/black-ties. a. So here are the question. How much is this hurting because semantically the naming convention of this URL and weird and doesn’t follow logical patterns. In other words. Should the product page for this be http://ties.com/black-ties/elite-solid-black-tie. How bad is this hurting us? b. If we were to change the ULR structure, should we do it in phases or all at once? We don’t want to get penalized. We have well over 3,000 product pages.
Technical SEO | | Ties.com0 -
Does Bing ignore robots txt files?
Bonjour from "Its a miracle is not raining" Wetherby Uk 🙂 Ok here goes... Why despite a robots text file excluding indexing to site http://lewispr.netconstruct-preview.co.uk/ is the site url being indexed in Bing bit not Google? Does bing ignore robots text files or is there something missing from http://lewispr.netconstruct-preview.co.uk/robots.txt I need to add to stop bing indexing a preview site as illustrated below. http://i216.photobucket.com/albums/cc53/zymurgy_bucket/preview-bing-indexed.jpg Any insights welcome 🙂
Technical SEO | | Nightwing0 -
Is having a sitemap.xml file still beneficial?
Hi, I'm pretty new to SEO and something I've noticed is that a lot of things become relevant and irrelevant like the weather. I was just wondering if having a sitemap.xml file for Google's use is still a good idea and beneficial? Logically thinking, my websites would get crawled faster by having one. Cheers.
Technical SEO | | davieshussein0