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
-
Where to put 301 redirects in my Wordpress htaccess file?
I have about 25 301 redirects in my Wordpress htaccess file, that look like this: <code>Redirect301/store/index.html https://www.notesinspanish.com/store-home/</code> At the moment they are at the bottom of my htaccess file, below the usual Wordpress rewrite rules: <code># BEGIN WordPress <ifmodulemod_rewrite.c>RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress</ifmodulemod_rewrite.c></code> So they are below all that. Above my WP rewrite rules I have a number of other rules from plugins (caching, ssl). Are my 301's OK where they are at the very bottom of that file? They are working, and redircting pages correctly. Should they be somewhere else? Many thanks for any help. Thanks for any help.
Technical SEO | | Benspain0 -
URL Structure On Site - Currently it's domain/product-name NOT domain/category/product name is this bad?
I have a eCommerce site and the site structure is domain/product-name rather than domain/product-category/product-name Do you think this will have a negative impact SEO Wise? I have seen that some of my individual product pages do get better rankings than my categories.
Technical SEO | | the-gate-films0 -
When to file a Reconsideration Request
Hi all, I don't have any manual penalties from Google but do have a unnatural links message from them back in 2012. We have removed some of the spammy links over the last 2 years but we're now making a further effort and will use the disavow tool once we've done this. Will this be enough once I submit the file or should I / can I submit a Reconsideration Request as well? Do I have to have a manual penalty item in my webmaster account to be able to submit a request? Thanks everyone!
Technical SEO | | KerryK0 -
Is it ok to use H1 tags in breadcrumbs?
A client has an e-commerce site and she doesn't want a page title on the products page. She has breadcrumbs though. Her website developer suggests putting the H1 on the breadcrumbs. So: products> Gifts > picture frame with h1 tags round the word "picture frame". Is this ok to do? Or is it a bad thing for SEO purposes? Thanks
Technical SEO | | AL123al0 -
Is it OK to 301 a .jpg (image) to a .html (page) ?
I have some old images that are no longer used, but they have a few decent external links pointing to them. Can I 301 them to the page they used to be on? And if yes, will their link juice flow to the page?
Technical SEO | | GregB1230 -
Is it a good idea to use an old domain name for a new product
Hi guys, I have a domain name XYZ.com which hosts the site of a technology service company as of now. The company however didn't do well and shut down a few years ago. Now, that company wants to launch a new set of technology products and wants to use the same domain name. Is it a good idea. The issues that I can see here are: 1. Google has previous pages indexed 2. There are a couple of subdomains totally irrelevant to the business. like employees.xyz.com there. 3. Can the previous indexing be completely undone. Regards, Mayank
Technical SEO | | mayanksaxena0 -
Our UE team has presented me with a site structure where the content (folders) does not match the hierarchical directory structure (in the CME)
Our UE team has presented me with a new site structure where the content (folders) does not match the hierarchical directory structure (in the CME). I.E Sub-sectors, sectors and product pages are ALL just 1 directory off the root. example.com/sector example.com/sub-sector example.com/productpage FYI 'normal' folder hierarchy would be; example.com/sector/ example.com/sector/sub-sector example.com/sector/sub-sector/productpage I cannot find any SEO disadvantages re; crawl, if anything the SE's will crawl more efficeitly with clearly less depth... higher 'deep content', and a better nav - which is technically a sound solution with link consistency throughout - 1 to 2 clicks to all pages. Only disadvantage might be a user confusion... which can be off-set with contextual breadcrumbs. Are there any PURE SEO disadvantages to a structure this illogical? Note - This does not abuse any Search Engine guidelines. Thanks for reading, Rich
Technical SEO | | richcowley0 -
Internal file extension canonicalization
Ok no doubt this is straightforward, however seem to be finding to hard to find a simple answer; our websites' internal pages have the extension .html. Trying to the navigate to that internal url without the .html extension results in a 404. The question is; should a 401 be used to direct to the extension-less url to future proof? and should internal links direct to the extension-less url for the same reason? Hopefully that makes sense and apologies for what I believe is a straightforward answer;
Technical SEO | | jg1000